criyle/codenet-compile-errors huggingface dataset:
Language: C++



#include <stdio.h>
int main(void)
{
  
int n[26] = {0};
char m[1300];
int i, z;
  
while(1){
  
if(scanf("%s",&m) == EOF)
break;
  
while(1){
if(m[i] == '\0')
break;
  
if('a' <= m[i] && m[i] <= 'z')
n[ m[i] - 'a']++;
  
if('A' <= m[i] && m[i] <= 'Z')
n[ m[i] - 'A']++;
  
i++;
}
  
for(i = 0; i < 26; i++){
z = i + 'a'
printf("%c : %d\n", z, n[i]);
}
  
return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:30:12: error: expected ';' before 'printf'
   30 | z = i + 'a'
      |            ^
      |            ;
   31 | printf("%c : %d\n", z, n[i]);
      | ~~~~~~      
a.cc:35:2: error: expected '}' at end of input
   35 | }
      |  ^
a.cc:5:1: note: to match this '{'
    5 | {
      | ^
Language: C++

#define _USE_MATH_DEFINES
#include <iostream>
#include <vector>
#include <math.h>
#include <string>
#include <string.h>
#include <stack>
#include <algorithm>
#include <stdio.h>
#include <functional>
#include <iomanip>
using namespace std;

//??°?????????????????°

void function()
{
	//??¢??°
}

int main()
{
	char c;
	int a[26] = { 0 };

	while (true)
	{
		scanf_s("%c", &c);
		if (isupper(c)) tolower(c);

		if ((int)'a' <= (int)c && (int)c <= (int)'z')
		{
			a[(int)c - (int)'a']++;
		}
		if (c == '\n') break;
	}

	for (int i = 0; i < 26; i++)
	{
		cout << (char)(i + (int)'a') << " : " << a[i] << endl;
	}
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:28:17: error: 'scanf_s' was not declared in this scope; did you mean 'scanf'?
   28 |                 scanf_s("%c", &c);
      |                 ^~~~~~~
      |                 scanf
Language: C++

#include<stdio.h>
int main(){
	char cha;
	int str[26],i;
	while (scanf("%c", &cha) != EOF){
		scanf_s("%c", &cha);
		if (cha >= 'A'&&cha <= 'Z')
		{
			cha = cha - 'A' + 'a';
			str[cha - 'a']++;
		}
	}
	for (i = 0; i < 26; i++){
		printf("%c : %d\n", i + 'a', str[i]);
	}
		return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:17: error: 'scanf_s' was not declared in this scope; did you mean 'scanf'?
    6 |                 scanf_s("%c", &cha);
      |                 ^~~~~~~
      |                 scanf
Language: C++

# include <iostream>
using namespace std;

int main(void) {

  int counter[26];
  for (int i=0; i<26; i++) {
    counter[i]=0;
  }

  char ch;
  while(cin>>ch){
    int num = tolower(ch) - 'a';
   counter[num]++;
  }

  for (int i=0; i<26; i++){
    ch = i + 'a';
    cout << ch < " : " << counter[i] << endl;
  }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:19:24: error: invalid operands of types 'const char [4]' and 'int' to binary 'operator<<'
   19 |     cout << ch < " : " << counter[i] << endl;
      |                  ~~~~~ ^~ ~~~~~~~~~~
      |                  |                 |
      |                  const char [4]    int
Language: C++

using System;

namespace ConsoleApplication24
{
class Program
{
static void Main(string[] args)
{
string alpha = "abcdefghijklmnopqrstuvwxyz";
int[] Sum = new int[alpha.Length];
while (true)
{
string input = Console.ReadLine();
if (input == null || input.Length == 0)
{
break;
}
else
{
for (int i = 0; i < input.Length; i++)
{
for (int j = 0; j < alpha.Length; j++)
{
if (string.Compare(input[i], alpha[j], true) == 0)
{
Sum[j]++;
}
}
}
}
}
for (int i = 0; i < alpha.Length; i++)
{
Console.WriteLine(alpha[i] + " : " + Sum[i]);
}
}
}
}

Compiler output:
a.cc:1:7: error: expected nested-name-specifier before 'System'
    1 | using System;
      |       ^~~~~~
a.cc:7:18: error: 'string' has not been declared
    7 | static void Main(string[] args)
      |                  ^~~~~~
a.cc:7:27: error: expected ',' or '...' before 'args'
    7 | static void Main(string[] args)
      |                           ^~~~
a.cc:37:2: error: expected ';' after class definition
   37 | }
      |  ^
      |  ;
a.cc: In static member function 'static void ConsoleApplication24::Program::Main(int*)':
a.cc:9:1: error: 'string' was not declared in this scope
    9 | string alpha = "abcdefghijklmnopqrstuvwxyz";
      | ^~~~~~
a.cc:10:4: error: structured binding declaration cannot have type 'int'
   10 | int[] Sum = new int[alpha.Length];
      |    ^~
a.cc:10:4: note: type must be cv-qualified 'auto' or reference to cv-qualified 'auto'
a.cc:10:4: error: empty structured binding declaration
a.cc:10:7: error: expected initializer before 'Sum'
   10 | int[] Sum = new int[alpha.Length];
      |       ^~~
a.cc:13:8: error: expected ';' before 'input'
   13 | string input = Console.ReadLine();
      |        ^~~~~
a.cc:14:5: error: 'input' was not declared in this scope; did you mean 'int'?
   14 | if (input == null || input.Length == 0)
      |     ^~~~~
      |     int
a.cc:14:14: error: 'null' was not declared in this scope
   14 | if (input == null || input.Length == 0)
      |              ^~~~
a.cc:22:21: error: 'alpha' was not declared in this scope
   22 | for (int j = 0; j < alpha.Length; j++)
      |                     ^~~~~
a.cc:26:1: error: 'Sum' was not declared in this scope
   26 | Sum[j]++;
      | ^~~
a.cc:32:21: error: 'alpha' was not declared in this scope
   32 | for (int i = 0; i < alpha.Length; i++)
      |                     ^~~~~
a.cc:34:1: error: 'Console' was not declared in this scope
   34 | Console.WriteLine(alpha[i] + " : " + Sum[i]);
      | ^~~~~~~
a.cc:34:38: error: 'Sum' was not declared in this scope
   34 | Console.WriteLine(alpha[i] + " : " + Sum[i]);
      |                                      ^~~
Language: C++

using System;

namespace ConsoleApplication24
{
class Program
{
static void Main(string[] args)
{
string alpha = "abcdefghijklmnopqrstuvwxyz";
int[] Sum = new int[alpha.Length];
while (true)
{
string input = Console.ReadLine();
if (input == null || input.Length == 0)
{
break;
}
else
{
for (int i = 0; i < input.Length; i++)
{
for (int j = 0; j < alpha.Length; j++)
{
if (input[i] == alpha[j])
{
Sum[j]++;
}
}
}
}
}
for (int i = 0; i < alpha.Length; i++)
{
Console.WriteLine(alpha[i] + " : " + Sum[i]);
}
}
}
}

Compiler output:
a.cc:1:7: error: expected nested-name-specifier before 'System'
    1 | using System;
      |       ^~~~~~
a.cc:7:18: error: 'string' has not been declared
    7 | static void Main(string[] args)
      |                  ^~~~~~
a.cc:7:27: error: expected ',' or '...' before 'args'
    7 | static void Main(string[] args)
      |                           ^~~~
a.cc:37:2: error: expected ';' after class definition
   37 | }
      |  ^
      |  ;
a.cc: In static member function 'static void ConsoleApplication24::Program::Main(int*)':
a.cc:9:1: error: 'string' was not declared in this scope
    9 | string alpha = "abcdefghijklmnopqrstuvwxyz";
      | ^~~~~~
a.cc:10:4: error: structured binding declaration cannot have type 'int'
   10 | int[] Sum = new int[alpha.Length];
      |    ^~
a.cc:10:4: note: type must be cv-qualified 'auto' or reference to cv-qualified 'auto'
a.cc:10:4: error: empty structured binding declaration
a.cc:10:7: error: expected initializer before 'Sum'
   10 | int[] Sum = new int[alpha.Length];
      |       ^~~
a.cc:13:8: error: expected ';' before 'input'
   13 | string input = Console.ReadLine();
      |        ^~~~~
a.cc:14:5: error: 'input' was not declared in this scope; did you mean 'int'?
   14 | if (input == null || input.Length == 0)
      |     ^~~~~
      |     int
a.cc:14:14: error: 'null' was not declared in this scope
   14 | if (input == null || input.Length == 0)
      |              ^~~~
a.cc:22:21: error: 'alpha' was not declared in this scope
   22 | for (int j = 0; j < alpha.Length; j++)
      |                     ^~~~~
a.cc:26:1: error: 'Sum' was not declared in this scope
   26 | Sum[j]++;
      | ^~~
a.cc:32:21: error: 'alpha' was not declared in this scope
   32 | for (int i = 0; i < alpha.Length; i++)
      |                     ^~~~~
a.cc:34:1: error: 'Console' was not declared in this scope
   34 | Console.WriteLine(alpha[i] + " : " + Sum[i]);
      | ^~~~~~~
a.cc:34:38: error: 'Sum' was not declared in this scope
   34 | Console.WriteLine(alpha[i] + " : " + Sum[i]);
      |                                      ^~~
Language: C++

#include <iostream>
#include <string>
#include <vector>
#include <sstream>
#include <algorithm>
#include <stdio.h>
#include <cstring>
#include <iomanip>
#define _USE_MATH_DEFINES
#include <math.h>
#include <numeric>

//#include <map>

using namespace std;

int main()
{
	string s;
	getline(cin, s);

	char ch[1200];
	memset(ch, 0, sizeof(ch));
	
	strcpy_s(ch, s.c_str());

	vector<string> vs;

	for (char i = 'a'; i <= 'z'; i++)
	{
		char * pth = ch;
		int count = 0;
		while (*pth)
		{
			if (*pth == i || *pth == i + 0x20)
			{
				count++;
			}
			pth++;
		}
		ostringstream ss;
		ss << i << " : " << count;
		string st;
		st = ss.str();
		vs.push_back(st);
	}

	for (int i = 0; i < vs.size(); i++)
	{
		cout << vs.at(i) << endl;
	}

	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:25:9: error: 'strcpy_s' was not declared in this scope; did you mean 'strcpy'?
   25 |         strcpy_s(ch, s.c_str());
      |         ^~~~~~~~
      |         strcpy
Language: C++

#include <stdio.h>
#include <stdlib.h>

#define MAX 1200

int main(void) {
  int i;
  int cnt_alpha[26] = {0};
  char ch;
  int temp;

  while (scanf("%c", &ch) != EOF) {
  // for (i = 0; i < MAX; i++) {
    // scanf("%c", &ch);
    // printf("I read [%c]!\n", ch);
    if ('a' <= ch && ch <= 'z') {
      cnt_alpha[ch - 'a']++;
    } else if ('A' <= ch && ch <= 'Z') {
      cnt_alpha[ch - 'A']++;
    // } else if (ch == '\n') {
      // break;
    // }
  }

  for (i = 'a'; i < 'z'; i++) {
    printf("%c : %d\n", i, cnt_alpha[i - 'a']);
  }

  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:30:2: error: expected '}' at end of input
   30 | }
      |  ^
a.cc:6:16: note: to match this '{'
    6 | int main(void) {
      |                ^
Language: C++

#include <stdio.h>
#include <string.h>
int main(){
    int k, i, j, count[30]={0}, n=0;
    char static str[1200];
    char alpha[26]="abcdefghijklmnopqrstuvwxyz";
    fgets(str,1200,stdin);
    printf("%d",n);
    for(i=0;i<n;i++){
        for(k=0;k<26;k++){
            if(str[i]==alpha[k]){
                count[k]++;
            }
        }
    }
    for(j=0;j<26;j++){
        printf("%c : %d\n", alpha[j], count[j]);
    }
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:20: error: initializer-string for 'char [26]' is too long [-fpermissive]
    6 |     char alpha[26]="abcdefghijklmnopqrstuvwxyz";
      |                    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
Language: C++

#include <stdio.h>
#include <string.h>
int main(){
    int k, i, j, count[30]={0}, n=0,x=0;
    char static str[1200];
    char alpha[26] = "abcdefghijklmnopqrstuvwxyz";
    char alpha1[26] = "ABCDEFGHIJKLMNOPQRSTUVWXYZ";
    while(1){
        str[x]=getchar();
        if(strcmp(&str[x],".")==0){
            break;
        }
        x++;
    }
    n = strlen(str);
    for(i=0; i<n; i++){
        for(k=0; k<26; k++){
            if(str[i] == alpha[k] || str[i] == alpha1[k]){
                count[k]++;
            }
        }
    }
    for(j=0; j<26; j++){
        printf("%c : %d\n", alpha[j], count[j]);
        }
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:22: error: initializer-string for 'char [26]' is too long [-fpermissive]
    6 |     char alpha[26] = "abcdefghijklmnopqrstuvwxyz";
      |                      ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
a.cc:7:23: error: initializer-string for 'char [26]' is too long [-fpermissive]
    7 |     char alpha1[26] = "ABCDEFGHIJKLMNOPQRSTUVWXYZ";
      |                       ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
Language: C++

#include <stdio.h>
#include <string.h>

int main() {
  char alpha;
  int i, N;
  int cnt[26] = {0};
  for( i = 0; alpha != EOF; i++ ) {
  scanf( "%c", &alpha );
    alpha = tolower( alpha );
    N = alpha - 'a';
    if( 0 <= N && N < 26 ) {
      cnt[i]++;
    }
  }
  for( i = 0; i < 26; i++ ) {
    printf( "%c : %d\n", i + 1, cnt[i] );
  }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:13: error: 'tolower' was not declared in this scope
   10 |     alpha = tolower( alpha );
      |             ^~~~~~~
Language: C++

#include<iostream>
#include<string>
#include<cctype>
using namespace std;
int b[26];
int main(){
    string a;
    char c[26]={'a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v','w','x','y','z'};
while(getline(cin,a){
    }
    for(int i=0;i<a.size();i++){
        for(int j=0;j<26;j++){
            if(a[i]==c[j] || a[i]==toupper(c[j])){
                b[j] += 1;
            }
        }
    }
    for(int i=0;i<26;i++){
        cout<<c[i]<<" : "<<b[i]<<endl;
    }
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:21: error: expected ')' before '{' token
    9 | while(getline(cin,a){
      |      ~              ^
      |                     )
Language: C++

#include <bits/stdc++.h>
#define FOR(i,n) for(int i=0;i<(int)(n);i++)
#define FORR(i,m,n) for(int i=(int)(m);i<(int)(n);i++)
using namespace std;
typedef long long ll;

void solve(){
 char c;
 int cnt[26];
 while(cin>>c){
  c=tolower(c);
  cnt[c-'a']++;
 }
 FOR(i,26)
  char cc='a'+i;
  cout<<cc<<" : "<<cnt[i]<<endl;
}

int main(){
 solve();
 return 0;
}

Compiler output:
a.cc: In function 'void solve()':
a.cc:16:9: error: 'cc' was not declared in this scope; did you mean 'c'?
   16 |   cout<<cc<<" : "<<cnt[i]<<endl;
      |         ^~
      |         c
a.cc:16:24: error: 'i' was not declared in this scope
   16 |   cout<<cc<<" : "<<cnt[i]<<endl;
      |                        ^
Language: C++

#include<cstdio>
#include<cctype>

int main(){
	int counter[26];
	char ch;

	for (int i = 0; i < 26; i++)
		counter[i] = 0;

	while (scanf_s("%c", &ch) != EOF){
		ch = tolower(ch);
		if (isalpha(ch))
			counter[ch - 'a']++;
	}

	for (int i = 0; i < 26; i++)
		printf("%c : %d\n", i + 'a', counter[i]);

	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:11:16: error: 'scanf_s' was not declared in this scope; did you mean 'scanf'?
   11 |         while (scanf_s("%c", &ch) != EOF){
      |                ^~~~~~~
      |                scanf
Language: C++

#include <iostream>
#include <ctype.h>
#include <string>
#include <sstream>
#include <unordered_map>
using namespace std;

int main(void){
  string input;
  bool loop = true;
  unordered_map<char, int> mp;
  string letters = "abcdefghijklmnopqrstuvwxyz";

  for (int i = 0; i < letters.length(); i++) {
    mp[letters[i]] = 0;
  }

  getline(cin, input);

  transform(input.begin(), input.end(), input.begin(), ::tolower);

  for (int i = 0; i < input.length(); i++) {
    int num = mp[input[i]];
    num += 1;
    mp[input[i]] = num;
  }

  for (int i = 0; i < letters.length(); i++) {
    cout << letters[i] << ":" << mp[letters[i]] << endl;
  }
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:20:3: error: 'transform' was not declared in this scope
   20 |   transform(input.begin(), input.end(), input.begin(), ::tolower);
      |   ^~~~~~~~~
Language: C++

#include <iostream>
#include <ctype.h>
#include <string>
#include <sstream>
#include <map>
using namespace std;

int main(void){
  string input;
  bool loop = true;
  map<char, int> mp;
  string letters = "abcdefghijklmnopqrstuvwxyz";

  for (int i = 0; i < letters.length(); i++) {
    mp[letters[i]] = 0;
  }

  getline(cin, input);

  transform(input.begin(), input.end(), input.begin(), ::tolower);

  for (int i = 0; i < input.length(); i++) {
    int num = mp[input[i]];
    num += 1;
    mp[input[i]] = num;
  }

  for (int i = 0; i < letters.length(); i++) {
    cout << letters[i] << ":" << mp[letters[i]] << endl;
  }
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:20:3: error: 'transform' was not declared in this scope
   20 |   transform(input.begin(), input.end(), input.begin(), ::tolower);
      |   ^~~~~~~~~
Language: C++

#include <stdio.h>
#include <iostream>
using namespace std;
#include <stdio.h>
int main()
{
	char abc[27] = { "abcdefghijklmnopqrstuvwxyz" }, ABC[27] = { "ABCDEFGHIJKLMNOPQRSTUVWXYZ" }, str;
	int count[26] = { 0 }, i = 0, j, k;
	while (1){
		scanf_s("%c", &str);
		if (str != '\n') break;
		if (str == '\0'){ continue; }
		for (j = 0; abc[i] != '\0'; j++){
			if (abc[j] == str){
				count[j]++; break;
			} else if (ABC[j] == str){
				count[j]++; break;
			}
		}
	}
	for (i = 0; i < 26; i++){
		printf("%c : %d", abc[i], count[i]);
		if (i != 26 - 1) printf("\n");
	}
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:17: error: 'scanf_s' was not declared in this scope; did you mean 'scanf'?
   10 |                 scanf_s("%c", &str);
      |                 ^~~~~~~
      |                 scanf
Language: C++

#include <iostream>
using namespace std;
#include <stdio.h>
int main()
{
	char str;
	int count[26] = { 0 }, i = 0, k;
	scanf_s("%c", &str);
	printf("%c : %d\n", str, str);
	while (1){
		cin >> str;
		if (str == EOF) break;
		if ('a' <= str && str <= 'z'){ k = str - 'a'; count[k]++; }
		if ('A' <= str && str <= 'Z'){ k = str - 'A'; count[k]++; }
	}
	for (i = 0; i < 26; i++){
		printf("%c : %d", 'a' + i, i);
		if (i != 26 - 1) printf("\n");
	}
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:9: error: 'scanf_s' was not declared in this scope; did you mean 'scanf'?
    8 |         scanf_s("%c", &str);
      |         ^~~~~~~
      |         scanf
Language: C++

#include <iostream>
using namespace std;
#include <stdio.h>
int main()
{
	char str[1202];
	int count[26]={0},i = 0,k;
	while (gets(str) != NULL){
		for (i = 0; str[i] != '\0'; i++){
			if ('a' <= str[i] && str[i] <= 'z'){ k = str[i] - 'a'; count[k]++; }
			if ('A' <= str[i] && str[i] <= 'Z'){ k = str[i] - 'A'; count[k]++; }
		}
	}
	for (i=0;i<26;i++){
		printf("%c : %d",'a'+i,count[i]);
		if (i!=26-1)printf("\n");
	}
	scanf_s("%c", &str);
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:16: error: 'gets' was not declared in this scope; did you mean 'getw'?
    8 |         while (gets(str) != NULL){
      |                ^~~~
      |                getw
a.cc:18:9: error: 'scanf_s' was not declared in this scope; did you mean 'scanf'?
   18 |         scanf_s("%c", &str);
      |         ^~~~~~~
      |         scanf
Language: C++

#include "stdafx.h"
#include <iostream>
#include <math.h>
#include <algorithm>
#include <iostream>
#include <string>
#include <cctype>
#include <stdio.h>
#include <string.h>
#include <iostream>
#include <regex>
#include <climits>
using namespace std;

int main()
{
	const int numOfAlp = 26;
	char ch;
	int *cnt = new int[numOfAlp];
	for (int i = 0; i < numOfAlp; i++) cnt[i] = 0;
	while (scanf_s("%c", &ch) != EOF) {
		if ('A' <= ch && ch <= 'Z') ch = tolower(ch);
		if ('a' <= ch && ch <= 'z') cnt[ch - 'a']++;
	}
	for (int i = 0; i < numOfAlp; i++) {
		printf("%c : %d\n", 'a' + i, cnt[i]);
	}
}

Compiler output:
a.cc:1:10: fatal error: stdafx.h: No such file or directory
    1 | #include "stdafx.h"
      |          ^~~~~~~~~~
compilation terminated.
Language: C++

//#include "stdafx.h"
#include <iostream>
#include <math.h>
#include <algorithm>
#include <iostream>
#include <string>
#include <cctype>
#include <stdio.h>
#include <string.h>
#include <iostream>
#include <regex>
#include <climits>
using namespace std;

int main()
{
	const int numOfAlp = 26;
	char ch;
	int *cnt = new int[numOfAlp];
	for (int i = 0; i < numOfAlp; i++) cnt[i] = 0;
	while (scanf_s("%c", &ch) != EOF) {
		if ('A' <= ch && ch <= 'Z') ch = tolower(ch);
		if ('a' <= ch && ch <= 'z') cnt[ch - 'a']++;
	}
	for (int i = 0; i < numOfAlp; i++) {
		printf("%c : %d\n", 'a' + i, cnt[i]);
	}
}

Compiler output:
a.cc: In function 'int main()':
a.cc:21:16: error: 'scanf_s' was not declared in this scope; did you mean 'scanf'?
   21 |         while (scanf_s("%c", &ch) != EOF) {
      |                ^~~~~~~
      |                scanf
Language: C++

#include <stdio.h>
int main()
{
  char a,cou[1][26];
  for(i=0;i<1200;i++){
    scanf("%c",&a);
    if('a'<=a&&a<='z'){
      cou[1][a-'a'+1]+=1;
    }
  }
  for(j='a';j<='z';j++){
    k+=1;
    printf("%c : %d",j,cou[1][k]);
  }
  return 0; 
}

Compiler output:
a.cc: In function 'int main()':
a.cc:5:7: error: 'i' was not declared in this scope
    5 |   for(i=0;i<1200;i++){
      |       ^
a.cc:11:7: error: 'j' was not declared in this scope
   11 |   for(j='a';j<='z';j++){
      |       ^
a.cc:12:5: error: 'k' was not declared in this scope
   12 |     k+=1;
      |     ^
Language: C++

#include <stdio.h>
int main(){

  char n;
  int i;
  int s[26]={};

  for(;;){
    scanf("%c",&n);

    if(n=='\n'){
      break;
    }

  
    for(i=0;i<=25;i++){
      if(n=='a'+i){
	s[i]++;
      }
      if(n=='A'+i){
	  s[i]++;
      }
    }
  }
      for(i=0;i<=25;i++){
	printf("%c : %d\n",'a'+i,s[i]);
　　　　s[i]=0;
      }

      return 0;

    }
  

Compiler output:
a.cc:27:1: error: extended character 　 is not valid in an identifier
   27 | 　　　　s[i]=0;
      | ^
a.cc:27:1: error: extended character 　 is not valid in an identifier
a.cc:27:1: error: extended character 　 is not valid in an identifier
a.cc:27:1: error: extended character 　 is not valid in an identifier
a.cc: In function 'int main()':
a.cc:27:1: error: '\U00003000\U00003000\U00003000\U00003000s' was not declared in this scope
   27 | 　　　　s[i]=0;
      | ^~~~~~~~~
Language: C++

#include <iostream>
using namespace std;

int main(){
	int num;
	int count [26]={0};
	char s;
	while(cin >> s){
		if(s>='a' && s<='z'){
			num=s-'a';
			count[num]++;
		}
		else if(s>='A' && s<='Z'){
			num=s-'A';
			count[num]++;
		}
	
		for(int j=0;j<26;j++) {
			int h='a'+i;
			cout<<(char) h <<":"<< count[i] << "\n";
		}
	}
		return 0;
	
}

Compiler output:
a.cc: In function 'int main()':
a.cc:19:35: error: 'i' was not declared in this scope
   19 |                         int h='a'+i;
      |                                   ^
Language: C++

#include <iostream>
#include <string>
#include <stddef.h>
#include <stack>
#include <queue>
#include <cctype>
#include <stdio.h>

using namespace std;


int main() {
	
	char ch;
	int a[26];
	fill(a, a + 26, 0);
	
	while (scanf_s("%c",&ch)!=EOF) {
		if (isalpha(ch)) {
			if (isupper(ch)) ch = tolower(ch);
			a[ch - 'a']++;
		}
	}


	for (int i = 0; i < 26; i++) {
		cout << (char)('a' + i) << " : " << a[i] << endl;
	}
	
}

Compiler output:
a.cc: In function 'int main()':
a.cc:18:16: error: 'scanf_s' was not declared in this scope; did you mean 'scanf'?
   18 |         while (scanf_s("%c",&ch)!=EOF) {
      |                ^~~~~~~
      |                scanf
Language: C++

#include <iostream>
using namespace std;

int main(){

	string str;
	int a[26]={0};
	int s=0;

	getline(cin, str);

	for(int i=0; i<str.size(); i++;){
		if('a'<=str[i] && str[i]<='z'){
			s = str[i] - 'a';
		}
		else if('A'<=str[i] && str[i]<='Z'){
			s = str[i] - 'A';
		}

		a[s] = a[s] + 1;
	}


	for(int i=0; i<26; i++){
		cout << (char)(i+'a') << " : " << a[i] << endl; 
	}
}

Compiler output:
a.cc: In function 'int main()':
a.cc:12:39: error: expected ')' before ';' token
   12 |         for(int i=0; i<str.size(); i++;){
      |            ~                          ^
      |                                       )
a.cc:12:40: error: expected primary-expression before ')' token
   12 |         for(int i=0; i<str.size(); i++;){
      |                                        ^
Language: C++

#include <iostream>
using namespace std;

int main(){

	int a[26]={0};
	char s;

	while(cin >> s){
		if('a'<=s && s<='z'){
			a[s-'a']++;
		}
		else if('A'<=s && s<='Z'){
			s = str[i] - 'A';
			a[s-'A']++;
		}
	}


	for(int i=0; i<26; i++){
		cout << (char)(i+'a') << " : " << a[i] << endl; 
	}
}

Compiler output:
a.cc: In function 'int main()':
a.cc:14:29: error: 'str' was not declared in this scope; did you mean 'std'?
   14 |                         s = str[i] - 'A';
      |                             ^~~
      |                             std
a.cc:14:33: error: 'i' was not declared in this scope
   14 |                         s = str[i] - 'A';
      |                                 ^
Language: C++

#include<iostream>
#include<cctype>
#include<cstdio>
#include<cstring>
using namespace std;
int main(){
    char ch;
    int num;
    int counter[26] = {};
    while(cin >> ch) {
        
        
        // if(num < 0) continue;
        if(!isalpha(tolower(ch)))continue;
        num = tolower(ch) - 'a';
        cout << "NUM " << num << " CH " << (char)tolower(ch) <<endl;
        counter[num] += 1;
        
        
    }
    
    for (int i = 0; i < 27; i++) {
        (char)i <<   ":" << counter[i] << endl;
    }
    
  
   
   
   
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:23:17: error: invalid operands of types 'char' and 'const char [2]' to binary 'operator<<'
   23 |         (char)i <<   ":" << counter[i] << endl;
      |         ~~~~~~~ ^~   ~~~
      |         |            |
      |         char         const char [2]
Language: C++

while True:
	try:
		ul_line=raw_input()
	except:
		break
	line=ul_line.lower()		

	dic_cnt={"a":0,"b":0,"c":0,"d":0,"e":0,
	         "f":0,"g":0,"h":0,"i":0,"j":0,
	         "k":0,"l":0,"m":0,"n":0,"o":0,
	         "p":0,"q":0,"r":0,"s":0,"t":0,
	         "u":0,"v":0,"w":0,"x":0,"y":0,
	         "z":0
	         }

	for i in line:
		if i in dic_cnt:
			dic_cnt[i]+=1
		else:
			pass

	alphabet="abcdefghijklmnopqrstuvwxyz"
	
	for i in alphabet:
		print i,
		print ":",
		print dic_cnt[i]

Compiler output:
a.cc:1:1: error: expected unqualified-id before 'while'
    1 | while True:
      | ^~~~~
a.cc:16:9: error: expected unqualified-id before 'for'
   16 |         for i in line:
      |         ^~~
Language: C++

#include<iostream>
#include<cstdio>
#include<cctype>
using namespace std;
????
int main(){
????????char ch;
????????int num[26] = {};
????
????????while(cin >> ch){
????????????????ch = tolower(ch);
????????????????if(isalpha(ch)){
????????????????????????num[ch-'a']++;
????????????????}
????????}
????
????????for(int i=0; i<26; i++){
????????????????printf("%c : %d\n",'a'+i,alpha[i]);
????????}
????
????????return 0;
}

Compiler output:
a.cc:5:1: error: expected unqualified-id before '?' token
    5 | ????
      | ^
Language: C++

#include<iostream>
#include<cstdio>
#include<cctype>
using namespace std;
????
int main(){
????????char ch;
????????int a[26] = {};
????
????????while(cin >> ch){
????????????????ch = tolower(ch);
????????????????if(isalpha(ch)){
????????????????????????a[ch-'a']++;
????????????????}
????????}
????
????????for(int i=0; i<26; i++){
????????????????printf("%c : %d\n",'a'+i,a[i]);
????????}
????
????????return 0;
}

Compiler output:
a.cc:5:1: error: expected unqualified-id before '?' token
    5 | ????
      | ^
Language: C++

#include<iostream>
#include<cstdio>
#include<cctype>
using namespace std;
????
int main(){
????????char ch;
????????int num[26] = {};
????
????????while(cin >> ch){
????????????????ch = tolower(ch);
????????????????if(isalpha(ch)){
????????????????????????num[ch-'a']++;
????????????????}
????????}
????
????????for(int i=0; i<26; i++){
????????????????printf("%c : %d\n",'a'+i,num[i]);
????????}
????
????????return 0;
}

Compiler output:
a.cc:5:1: error: expected unqualified-id before '?' token
    5 | ????
      | ^
Language: C++


#include<iostream>
#include <stdlib.h>
#include <ctype.h>
using namespace std;
  
int main()
{
	int i;
	int count[26] = {0};
	char c;
	string str;
	
	for( i=0, i<26, i++){
		
	while ( cin >> ch ){
		if(isalpha(ch)){
				ch = tolower(ch);
		}
			count[ch-'a']++;
		}
	}

	
	
	for( i=0; i<26; i++){
		char c ='a'+i;
		cout << c << ":" << count[i] << endl;
	}
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:14:28: error: expected ';' before ')' token
   14 |         for( i=0, i<26, i++){
      |                            ^
      |                            ;
a.cc:26:9: error: expected primary-expression before 'for'
   26 |         for( i=0; i<26; i++){
      |         ^~~
a.cc:22:10: error: expected ';' before 'for'
   22 |         }
      |          ^
      |          ;
......
   26 |         for( i=0; i<26; i++){
      |         ~~~
a.cc:26:9: error: expected primary-expression before 'for'
   26 |         for( i=0; i<26; i++){
      |         ^~~
a.cc:22:10: error: expected ')' before 'for'
   22 |         }
      |          ^
      |          )
......
   26 |         for( i=0; i<26; i++){
      |         ~~~
a.cc:14:12: note: to match this '('
   14 |         for( i=0, i<26, i++){
      |            ^
Language: C++


#include<iostream>
#include <stdlib.h>
#include <ctype.h>
using namespace std;
  
int main()
{
	int i;
	int count[26] = {0};
	char c;
	string str;
	
	for( i=0, i<26, i++){
		while ( cin >> ch ){
		if(isalpha(ch)){
				ch = tolower(ch);
		}
			count[ch-'a']++;
		}
	}

	
	for( i=0; i<26; i++){
		char c ='a'+i;
		cout << c << ":" << count[i] << endl;
	}
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:14:28: error: expected ';' before ')' token
   14 |         for( i=0, i<26, i++){
      |                            ^
      |                            ;
a.cc:24:9: error: expected primary-expression before 'for'
   24 |         for( i=0; i<26; i++){
      |         ^~~
a.cc:21:10: error: expected ';' before 'for'
   21 |         }
      |          ^
      |          ;
......
   24 |         for( i=0; i<26; i++){
      |         ~~~
a.cc:24:9: error: expected primary-expression before 'for'
   24 |         for( i=0; i<26; i++){
      |         ^~~
a.cc:21:10: error: expected ')' before 'for'
   21 |         }
      |          ^
      |          )
......
   24 |         for( i=0; i<26; i++){
      |         ~~~
a.cc:14:12: note: to match this '('
   14 |         for( i=0, i<26, i++){
      |            ^
Language: C++


#include<iostream>
#include <stdlib.h>
#include <ctype.h>
using namespace std;
  
int main()
{
	int i;
	int count[26] = {0};
	char c;
	string str;
	
	for( i=0; i<26; i++){
		while ( cin >> ch ){// ????????§ch?????¢??????????????????????????°??????
		if(isalpha(ch)){//?°???????
				ch = tolower(ch);
		}
			count[ch-'a']++;
		}
	}

	
	//a : a????????°?????????????????¨???
	for( i=0; i<26; i++){
		char c ='a'+i;
		cout << c << ":" << count[i] << endl;
	}
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:15:32: error: 'ch' was not declared in this scope; did you mean 'c'?
   15 |                 while ( cin >> ch ){// ????????§ch?????¢??????????????????????????°??????
      |                                ^~
      |                                c
Language: C++


#include<iostream>
#include <stdlib.h>
#include <ctype.h>
using namespace std;
  
int main()
{
	int i,j;
	int count[26] = {0};
	char ch;
	string a;
	
	for( i=0; i<a.size; i++){
		while ( cin >> ch ){// ????????§ch?????¢??????????????????????????°??????
		if(isalpha(ch)){//?°???????
				a[i]= tolower(a[i]);
		}
			count[ch-'a']++;
		}
	}

	
	//a : a????????°?????????????????¨???
	for( i=0; i<26; i++){
		char c ='a'+i;
		cout << c << ":" << count[i] << endl;
	}
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:14:23: error: invalid use of member function 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::size_type std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::size() const [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>; size_type = long unsigned int]' (did you forget the '()' ?)
   14 |         for( i=0; i<a.size; i++){
      |                     ~~^~~~
      |                           ()
Language: C++


#include<iostream>
#include<cstdio>
#include<cctype>
using namespace std;
 
int main()
{
    char ch;
    int alpha[26] = {};
 
    while(cin >> ch){
        ch = tolower(ch);
        if(isalpha(ch)){
            alpha[ch-'a']++;
        }
    }
 
    for(int i=0; i<26; i++){
        char c ='a'+i;
		cout << c << ":" << count[i] << endl;
    }
 
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:21:37: error: 'count' was not declared in this scope
   21 |                 cout << c << ":" << count[i] << endl;
      |                                     ^~~~~
Language: C++


#include<iostream>
#include <stdlib.h>
#include <ctype.h>
using namespace std;
  
int main()
{
	int i,j;
	int count[26] = {0};
	char ch;
	string a;
	
	for( i=0; i<a.size; i++){
		while ( cin >> ch ){// ????????§ch?????¢??????????????????????????°??????
		if(isalpha(ch)){
			a[i]= tolower(a[i]);
		}
			count[ch-'a']++;
		}
	}

	
	//a : a????????°?????????????????¨???
	for( i=0; i<26; i++){
		char c ='a'+i;
		cout << c << ":" << count[i] << endl;
	}
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:14:23: error: invalid use of member function 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::size_type std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::size() const [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>; size_type = long unsigned int]' (did you forget the '()' ?)
   14 |         for( i=0; i<a.size; i++){
      |                     ~~^~~~
      |                           ()
Language: C++


#include<iostream>
#include <stdlib.h>
#include <ctype.h>
using namespace std;
  
int main()
{
	int i,j;
	int count[26] = {0};
	char ch;
	string a;
	
	for( i=0; i<26; i++){
		while ( cin >> ch ){// ????????§ch?????¢??????????????????????????°??????
		if(isalpha(ch)){
			a[i]= tolower(a[i]);
		}
			count[ch-'a']++;
		}
	
	
	//a : a????????°?????????????????¨???
	for( i=0; i<26; i++){
		char c ='a'+i;
		cout << c << ":" << count[i] << endl;
	}
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:29:2: error: expected '}' at end of input
   29 | }
      |  ^
a.cc:8:1: note: to match this '{'
    8 | {
      | ^
Language: C++

#include <iostream>
#include <algorithm>
#include <string>
#include <cctype>
using namespace std;
  
int main()
{
	int i;
	int cnt[26] = { 0 };
	char ch;

	for( cin >> ch ){// ????????§ch?????¢??????????????????????????°??????
		if(isalpha(ch)){
			if(isupper(ch)){
				ch = tolower(ch);
		}
			cnt[ch-'a']++;
		}
	}
	
	//a : a????????°?????????????????¨???
	for( i=0; i<26; i++){
		char c ='a'+i;
		cout << c << ":" << cnt[i] << endl;
	}
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:13:23: error: expected ';' before ')' token
   13 |         for( cin >> ch ){// ????????§ch?????¢??????????????????????????°??????
      |                       ^~
      |                       ;
a.cc:23:9: error: expected primary-expression before 'for'
   23 |         for( i=0; i<26; i++){
      |         ^~~
a.cc:20:10: error: expected ';' before 'for'
   20 |         }
      |          ^
      |          ;
......
   23 |         for( i=0; i<26; i++){
      |         ~~~
a.cc:23:9: error: expected primary-expression before 'for'
   23 |         for( i=0; i<26; i++){
      |         ^~~
a.cc:20:10: error: expected ')' before 'for'
   20 |         }
      |          ^
      |          )
......
   23 |         for( i=0; i<26; i++){
      |         ~~~
a.cc:13:12: note: to match this '('
   13 |         for( cin >> ch ){// ????????§ch?????¢??????????????????????????°??????
      |            ^
Language: C++

#include <iostream>
#include <algorithm>
#include <string>
#include <cctype>
using namespace std;
  
int main()
{
	int i;
	int cnt[26] = { 0 };
	char ch;

	for( cin >> ch ){// ????????§ch?????¢??????????????????????????°??????
		if(isalpha(ch)){
			if(isupper(ch))
			ch = tolower(ch);
			cnt[ch-'a']++;
		}
	}
	
	//a : a????????°?????????????????¨???
	for( i=0; i<26; i++){
		char c ='a'+i;
		cout << c << ":" << cnt[i] << endl;
	}
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:13:23: error: expected ';' before ')' token
   13 |         for( cin >> ch ){// ????????§ch?????¢??????????????????????????°??????
      |                       ^~
      |                       ;
a.cc:22:9: error: expected primary-expression before 'for'
   22 |         for( i=0; i<26; i++){
      |         ^~~
a.cc:19:10: error: expected ';' before 'for'
   19 |         }
      |          ^
      |          ;
......
   22 |         for( i=0; i<26; i++){
      |         ~~~
a.cc:22:9: error: expected primary-expression before 'for'
   22 |         for( i=0; i<26; i++){
      |         ^~~
a.cc:19:10: error: expected ')' before 'for'
   19 |         }
      |          ^
      |          )
......
   22 |         for( i=0; i<26; i++){
      |         ~~~
a.cc:13:12: note: to match this '('
   13 |         for( cin >> ch ){// ????????§ch?????¢??????????????????????????°??????
      |            ^
Language: C++

#include <iostream>
#include <algorithm>
#include <string>
#include <cctype>
using namespace std;
 
int main() {
    int cnt[26] = { 0 };
    for(char ch; cin >> ch; ) {
        if(isalpha(ch)) {
            if(isupper(ch)) ch = tolower(ch);
            cnt[ch - 'a']++;
        }
    }
 for( i=0; i<26; i++){
		char c ='a'+i;
		cout << c << ":" << cnt[i] << endl;
	}
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:15:7: error: 'i' was not declared in this scope
   15 |  for( i=0; i<26; i++){
      |       ^
Language: C++

#include <iostream>
#include <algorithm>
#include <string>
#include <cctype>
using namespace std;
  
int main()
{
	int i;
	int cnt[26] = { 0 };
	char ch;

	while(cin >> ch ){// ????????§ch?????¢??????????????????????????°??????
		if(isalpha(ch)){
			if(isupper(ch))
			ch = tolower(ch);
			cnt[ch-'a']++;
		}
	}
	
	//a : a????????°?????????????????¨???
	for( i=0; i<26; i++){
		char c ='a'+i;
		cout << (char)('a'+i); << ":" << cnt[i] << endl;
	}
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:24:40: error: expected primary-expression before '<<' token
   24 |                 cout << (char)('a'+i); << ":" << cnt[i] << endl;
      |                                        ^~
Language: C++

#include <iostream>
#include <algorithm>
#include <string>
#include <cctype>
using namespace std;
  
int main()
{
	int i;
	int cnt[26] = { 0 };
	char ch;

	while(cin >> ch ){// ????????§ch?????¢??????????????????????????°??????
		if(isalpha(ch)){
			if(isupper(ch))
			ch = tolower(ch);
			cnt[ch-'a']++;
		}
	}
	
	//a : a????????°?????????????????¨???
	for( i=0; i<26; i++){
		cout << (char)('a'+i); << ":" << cnt[i] << endl;
	}
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:23:40: error: expected primary-expression before '<<' token
   23 |                 cout << (char)('a'+i); << ":" << cnt[i] << endl;
      |                                        ^~
Language: C++

#include<iostream>
#include<string>
#include<vector>
using namespace std;

void Counting(vector<int>& Count, int i, string Letter)
{
	for(unsigned int j = 0; j < Letter.size(); j++){
		if(Letter[j] == alphabet || Letter[j] == Alphabet) Count[i]++;
	}
}

int main()
{
	vector<int> Count(26, 0);
	string Letter;
	while(getline(cin, Letter)){
		for(unsigned int i = 0; i < 26; i++){
			char alphabet = 'a';
			char Alphabet = 'A';
			alphabet += i;
			Alphabet += i;
			Counting(Count, i, Letter);
		}
	}

	for(unsigned int i = 0; i < 26; i++){
		char alphabet = 'a' + i;
		cout << alphabet << " : " << Count[i] << endl;
	}

	return 0;
}

Compiler output:
a.cc: In function 'void Counting(std::vector<int>&, int, std::string)':
a.cc:9:33: error: 'alphabet' was not declared in this scope
    9 |                 if(Letter[j] == alphabet || Letter[j] == Alphabet) Count[i]++;
      |                                 ^~~~~~~~
a.cc:9:58: error: 'Alphabet' was not declared in this scope
    9 |                 if(Letter[j] == alphabet || Letter[j] == Alphabet) Count[i]++;
      |                                                          ^~~~~~~~
Language: C++

#include "bits/stdc++.h"
#include<unordered_map>
#include<unordered_set>
#pragma warning(disable:4996)
using namespace std;
using ld = long double;
template<class T>
using Table = vector<vector<T>>;
const ld eps=1e-9;

//// < "D:\D_Download\Visual Studio 2015\Projects\programing_contest_c++\Debug\a.txt" > "D:\D_Download\Visual Studio 2015\Projects\programing_contest_c++\Debug\b.txt"
 


int main() {
	string st;
	while (getline(cin, st)) {

		vector<int>nums(26);
		for (auto c : st) {
			if (c <= 'z'&&c >= 'a')nums[c - 'a']++;
			if (c <= 'Z'&&c >= 'A')nums[c - 'A'] ++;
		}
	}
	for (int i = 0; i < 26; ++i) {
		cout << char('a' + i) << " : " << nums[i] << endl;
	}
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:26:51: error: 'nums' was not declared in this scope
   26 |                 cout << char('a' + i) << " : " << nums[i] << endl;
      |                                                   ^~~~
Language: C++

#include<iostream>
#include<string>
#include<cstdio>

using namespace std;

int main() {
	char a[1200],*s;
	int i,d[26],j,k;
	j = 0;
	for (i = 0; i < 26; i++) {
		d[i] = 0;
	}
	char b;
	while (scanf_s("%c", a) != EOF) {
		j++;
	}
	for (s = a, i = 0; i < j; i++, s++) {
			*s = tolower(*s);
		}
		for (i = 0; i < 26; i++) {
			for (s = a,k=0; k<j;k++, s++) {
				b = 97 + i;
				if (*s == b) {
					d[i] += 1;
				}
			}
		}
		for (i = 0; i < 26; i++) {
			b = 97 + i;
			cout << b << " : " << d[i] << endl;
		}
	
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:15:16: error: 'scanf_s' was not declared in this scope; did you mean 'scanf'?
   15 |         while (scanf_s("%c", a) != EOF) {
      |                ^~~~~~~
      |                scanf
Language: C++

include <iostream>
#include<cctype>
using namespace std;
 
int main()
{
	char ch;
	int count[26]={};

	while(1){
		cin >> ch;
		if( ch=='.'){
			break;
		}else if(islower(ch)){
			count[ch-'a']++;
		}else if(isupper(ch)){
			count[ch-'A']++;
		}
	}


	for(int i=0; i<26; i++){
		cout << char(i+'a') << ':' << count[i] << "\n";
	}


    return 0;
}

Compiler output:
a.cc:1:1: error: 'include' does not name a type
    1 | include <iostream>
      | ^~~~~~~
a.cc: In function 'int main()':
a.cc:11:17: error: 'cin' was not declared in this scope
   11 |                 cin >> ch;
      |                 ^~~
a.cc:3:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
    2 | #include<cctype>
  +++ |+#include <iostream>
    3 | using namespace std;
a.cc:23:17: error: 'cout' was not declared in this scope
   23 |                 cout << char(i+'a') << ':' << count[i] << "\n";
      |                 ^~~~
a.cc:23:17: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
Language: C++

#include<iostream>
#include <cstdio>
#include<cctype>
#include<string>

using namespace std;

int main(){
	char ch;
	int cnt[26]={0};
	
	while(cin >> ch){
		if(islower(ch){
			int num = ch - 'a';
			cnt[num]++;
		}else if(isupper(ch){
			int num = ch - 'A';
			cnt[num]++;
		}
	}
	
	for(int i = 0; i < 26; i++){
		cout << char(i + 'a')<<":"<<cnt[i]<<endl;
	}
	
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:13:31: error: expected ')' before '{' token
   13 |                 if(islower(ch){
      |                   ~           ^
      |                               )
a.cc:20:9: error: expected primary-expression before '}' token
   20 |         }
      |         ^
Language: C++

#include<iostream>
#include<cctype>
using namespace std;

int main(){
  char ch;
  int count[26] = {0};
  int i;

  while(){
    cin >> ch;
    //if(isalpha(ch) == 0) break;
    count[tolower(ch) - 'a']++;
  }
  for(i = 0; i < 26; i++){
    cout << (char)(i + 'a') << " : " << count[i] << endl;
  }
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:9: error: expected primary-expression before ')' token
   10 |   while(){
      |         ^
Language: C++

#include<iostream>
#include<cstdio>
#include<cctype>
 
using namespace std;
int main(){
    char ch;
    int cnt[26]={};
     
    while(cin >> ch){
        ch = tolower(ch);
        if(isalpha(ch)){
            cnt[ch-'a']++;
        }
    }
     
    for(int i = 0;i<26;i++){
        printf("%c : %d\n",i+'a',cnt[i]);
    }
     
    return 0;

Compiler output:
a.cc: In function 'int main()':
a.cc:21:14: error: expected '}' at end of input
   21 |     return 0;
      |              ^
a.cc:6:11: note: to match this '{'
    6 | int main(){
      |           ^
Language: C++

#include <iostream>
#include <cctype>

using namespace std;

int main()
{
    char* str = new char[MAX_LEN + 1];
    int*  counter = new int[26] = {0};
    
    cin.getline(str, MAX_LEN, '\n');

    for (int i = 0; str[i] != '\0'; i++) {
         if (str[i] >= 'A' && str[i] <= 'Z')
             str[i] = tolower(str[i]);
         }

         if (str[i] >= 'A' && str[i] <= 'z') {
             counter[ch - 'a']++;
         }
    }

    for (int i = 0; i < 26; i++) {
         cout << 'a' + i << counter[i] << endl;
    }

    delete[] str;
    delete[] counter;

    return (0);
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:26: error: 'MAX_LEN' was not declared in this scope
    8 |     char* str = new char[MAX_LEN + 1];
      |                          ^~~~~~~
a.cc:9:21: error: lvalue required as left operand of assignment
    9 |     int*  counter = new int[26] = {0};
      |                     ^~~~~~~~~~~
a.cc:18:18: error: 'i' was not declared in this scope
   18 |          if (str[i] >= 'A' && str[i] <= 'z') {
      |                  ^
a.cc:19:22: error: 'ch' was not declared in this scope
   19 |              counter[ch - 'a']++;
      |                      ^~
a.cc: At global scope:
a.cc:23:5: error: expected unqualified-id before 'for'
   23 |     for (int i = 0; i < 26; i++) {
      |     ^~~
a.cc:23:21: error: 'i' does not name a type
   23 |     for (int i = 0; i < 26; i++) {
      |                     ^
a.cc:23:29: error: 'i' does not name a type
   23 |     for (int i = 0; i < 26; i++) {
      |                             ^
a.cc:27:5: error: expected unqualified-id before 'delete'
   27 |     delete[] str;
      |     ^~~~~~
a.cc:28:5: error: expected unqualified-id before 'delete'
   28 |     delete[] counter;
      |     ^~~~~~
a.cc:30:5: error: expected unqualified-id before 'return'
   30 |     return (0);
      |     ^~~~~~
a.cc:31:1: error: expected declaration before '}' token
   31 | }
      | ^
Language: C++

#include <iostream>
#include <cctype>

#define MAX_LEN (1200)

using namespace std;

int main()
{
    char* str = new char[MAX_LEN + 1];
    int*  counter = new int[26] = {0};
    
    cin.getline(str, MAX_LEN, '\n');

    for (int i = 0; str[i] != '\0'; i++) {
         if (str[i] >= 'A' && str[i] <= 'Z')
             str[i] = tolower(str[i]);
         }

         if (str[i] >= 'A' && str[i] <= 'z') {
             counter[ch - 'a']++;
         }
    }

    for (int i = 0; i < 26; i++) {
         cout << 'a' + i << counter[i] << endl;
    }

    delete[] str;
    delete[] counter;

    return (0);
}

Compiler output:
a.cc: In function 'int main()':
a.cc:11:21: error: lvalue required as left operand of assignment
   11 |     int*  counter = new int[26] = {0};
      |                     ^~~~~~~~~~~
a.cc:20:18: error: 'i' was not declared in this scope
   20 |          if (str[i] >= 'A' && str[i] <= 'z') {
      |                  ^
a.cc:21:22: error: 'ch' was not declared in this scope
   21 |              counter[ch - 'a']++;
      |                      ^~
a.cc: At global scope:
a.cc:25:5: error: expected unqualified-id before 'for'
   25 |     for (int i = 0; i < 26; i++) {
      |     ^~~
a.cc:25:21: error: 'i' does not name a type
   25 |     for (int i = 0; i < 26; i++) {
      |                     ^
a.cc:25:29: error: 'i' does not name a type
   25 |     for (int i = 0; i < 26; i++) {
      |                             ^
a.cc:29:5: error: expected unqualified-id before 'delete'
   29 |     delete[] str;
      |     ^~~~~~
a.cc:30:5: error: expected unqualified-id before 'delete'
   30 |     delete[] counter;
      |     ^~~~~~
a.cc:32:5: error: expected unqualified-id before 'return'
   32 |     return (0);
      |     ^~~~~~
a.cc:33:1: error: expected declaration before '}' token
   33 | }
      | ^