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

#include <bits/stdc++.h>
using namespace std;

int main(){
	char GG[127];
	int 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;
	int num;
while(cin >> GG;){
	a = srelen(GG);
	for(int kero = 0;kero < a; kero++){
		if(GG[kero] == 'a' ||GG[kero] == 'A')a++ ;
		else if(GG[kero] == 'b' ||GG[kero] == 'B')b++ ;
		else if(GG[kero] == 'c' ||GG[kero] == 'C')c++ ;
		else if(GG[kero] == 'd' ||GG[kero] == 'D')d++ ;
		else if(GG[kero] == 'e' ||GG[kero] == 'E')e++ ;
		else if(GG[kero] == 'f' ||GG[kero] == 'F')f++ ;
		else if(GG[kero] == 'g' ||GG[kero] == 'G')g++ ;
		else if(GG[kero] == 'h' ||GG[kero] == 'H')h++ ;
		else if(GG[kero] == 'i' ||GG[kero] == 'I')i++ ;
		else if(GG[kero] == 'j' ||GG[kero] == 'J')j++ ;
		else if(GG[kero] == 'k' ||GG[kero] == 'K')k++ ;
		else if(GG[kero] == 'l' ||GG[kero] == 'L')l++ ;
		else if(GG[kero] == 'm' ||GG[kero] == 'M')m++ ;
		else if(GG[kero] == 'n' ||GG[kero] == 'N')n++ ;
		else if(GG[kero] == 'o' ||GG[kero] == 'O')o++ ;
		else if(GG[kero] == 'p' ||GG[kero] == 'P')p++ ;
		else if(GG[kero] == 'q' ||GG[kero] == 'Q')q++ ;
		else if(GG[kero] == 'r' ||GG[kero] == 'R')r++ ;
		else if(GG[kero] == 's' ||GG[kero] == 'S')s++ ;
		else if(GG[kero] == 't' ||GG[kero] == 'T')t++ ;
		else if(GG[kero] == 'u' ||GG[kero] == 'U')u++ ;
		else if(GG[kero] == 'v' ||GG[kero] == 'V')v++ ;
		else if(GG[kero] == 'w' ||GG[kero] == 'W')w++ ;
		else if(GG[kero] == 'x' ||GG[kero] == 'X')x++ ;
		else if(GG[kero] == 'y' ||GG[kero] == 'Y')y++ ;
		else if(GG[kero] == 'z' ||GG[kero] == 'Z')z++ ;
		}
	}
	cout << "a : " << a << endl;
	cout << "b : " << b << endl;
	cout << "c : " << c << endl;
	cout << "d : " << d << endl;
	cout << "e : " << e << endl;
	cout << "f : " << f << endl;
	cout << "g : " << g << endl;
	cout << "h : " << h << endl;
	cout << "i : " << i << endl;
	cout << "j : " << j << endl;
	cout << "k : " << k << endl;
	cout << "l : " << l << endl;
	cout << "m : " << m << endl;
	cout << "n : " << n << endl;
	cout << "o : " << o << endl;
	cout << "p : " << p << endl;
	cout << "q : " << q << endl;
	cout << "r : " << r << endl;
	cout << "s : " << s << endl;
	cout << "t : " << t << endl;
	cout << "u : " << u << endl;
	cout << "v : " << v << endl;
	cout << "w : " << w << endl;
	cout << "x : " << x << endl;
	cout << "y : " << y << endl;
	cout << "z : " << z << endl;

	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:16: error: expected ')' before ';' token
    8 | while(cin >> GG;){
      |      ~         ^
      |                )
a.cc:8:17: error: expected primary-expression before ')' token
    8 | while(cin >> GG;){
      |                 ^
Language: C++

#include <bits/stdc++.h>
using namespace std;

int main(){
	char GG[127];
	int 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;
	int num;
while(cin >> GG){
	a = srelen(GG);
	for(int kero = 0;kero < a; kero++){
		if(GG[kero] == 'a' ||GG[kero] == 'A')a++ ;
		else if(GG[kero] == 'b' ||GG[kero] == 'B')b++ ;
		else if(GG[kero] == 'c' ||GG[kero] == 'C')c++ ;
		else if(GG[kero] == 'd' ||GG[kero] == 'D')d++ ;
		else if(GG[kero] == 'e' ||GG[kero] == 'E')e++ ;
		else if(GG[kero] == 'f' ||GG[kero] == 'F')f++ ;
		else if(GG[kero] == 'g' ||GG[kero] == 'G')g++ ;
		else if(GG[kero] == 'h' ||GG[kero] == 'H')h++ ;
		else if(GG[kero] == 'i' ||GG[kero] == 'I')i++ ;
		else if(GG[kero] == 'j' ||GG[kero] == 'J')j++ ;
		else if(GG[kero] == 'k' ||GG[kero] == 'K')k++ ;
		else if(GG[kero] == 'l' ||GG[kero] == 'L')l++ ;
		else if(GG[kero] == 'm' ||GG[kero] == 'M')m++ ;
		else if(GG[kero] == 'n' ||GG[kero] == 'N')n++ ;
		else if(GG[kero] == 'o' ||GG[kero] == 'O')o++ ;
		else if(GG[kero] == 'p' ||GG[kero] == 'P')p++ ;
		else if(GG[kero] == 'q' ||GG[kero] == 'Q')q++ ;
		else if(GG[kero] == 'r' ||GG[kero] == 'R')r++ ;
		else if(GG[kero] == 's' ||GG[kero] == 'S')s++ ;
		else if(GG[kero] == 't' ||GG[kero] == 'T')t++ ;
		else if(GG[kero] == 'u' ||GG[kero] == 'U')u++ ;
		else if(GG[kero] == 'v' ||GG[kero] == 'V')v++ ;
		else if(GG[kero] == 'w' ||GG[kero] == 'W')w++ ;
		else if(GG[kero] == 'x' ||GG[kero] == 'X')x++ ;
		else if(GG[kero] == 'y' ||GG[kero] == 'Y')y++ ;
		else if(GG[kero] == 'z' ||GG[kero] == 'Z')z++ ;
		else if(GG[kero] == '\n')break;
		}

	}
	cout << "a : " << a << endl;
	cout << "b : " << b << endl;
	cout << "c : " << c << endl;
	cout << "d : " << d << endl;
	cout << "e : " << e << endl;
	cout << "f : " << f << endl;
	cout << "g : " << g << endl;
	cout << "h : " << h << endl;
	cout << "i : " << i << endl;
	cout << "j : " << j << endl;
	cout << "k : " << k << endl;
	cout << "l : " << l << endl;
	cout << "m : " << m << endl;
	cout << "n : " << n << endl;
	cout << "o : " << o << endl;
	cout << "p : " << p << endl;
	cout << "q : " << q << endl;
	cout << "r : " << r << endl;
	cout << "s : " << s << endl;
	cout << "t : " << t << endl;
	cout << "u : " << u << endl;
	cout << "v : " << v << endl;
	cout << "w : " << w << endl;
	cout << "x : " << x << endl;
	cout << "y : " << y << endl;
	cout << "z : " << z << endl;

	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:13: error: 'srelen' was not declared in this scope; did you mean 'strnlen'?
    9 |         a = srelen(GG);
      |             ^~~~~~
      |             strnlen
Language: C++

#include <bits/stdc++.h>
using namespace std;

int main(){
	char GG[127];
	int 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;
	int num;
while(cin >> GG){
	num = srelen(GG);
	for(int kero = 0;kero < num; kero++){
		if(GG[kero] == 'a' ||GG[kero] == 'A')a++ ;
		else if(GG[kero] == 'b' ||GG[kero] == 'B')b++ ;
		else if(GG[kero] == 'c' ||GG[kero] == 'C')c++ ;
		else if(GG[kero] == 'd' ||GG[kero] == 'D')d++ ;
		else if(GG[kero] == 'e' ||GG[kero] == 'E')e++ ;
		else if(GG[kero] == 'f' ||GG[kero] == 'F')f++ ;
		else if(GG[kero] == 'g' ||GG[kero] == 'G')g++ ;
		else if(GG[kero] == 'h' ||GG[kero] == 'H')h++ ;
		else if(GG[kero] == 'i' ||GG[kero] == 'I')i++ ;
		else if(GG[kero] == 'j' ||GG[kero] == 'J')j++ ;
		else if(GG[kero] == 'k' ||GG[kero] == 'K')k++ ;
		else if(GG[kero] == 'l' ||GG[kero] == 'L')l++ ;
		else if(GG[kero] == 'm' ||GG[kero] == 'M')m++ ;
		else if(GG[kero] == 'n' ||GG[kero] == 'N')n++ ;
		else if(GG[kero] == 'o' ||GG[kero] == 'O')o++ ;
		else if(GG[kero] == 'p' ||GG[kero] == 'P')p++ ;
		else if(GG[kero] == 'q' ||GG[kero] == 'Q')q++ ;
		else if(GG[kero] == 'r' ||GG[kero] == 'R')r++ ;
		else if(GG[kero] == 's' ||GG[kero] == 'S')s++ ;
		else if(GG[kero] == 't' ||GG[kero] == 'T')t++ ;
		else if(GG[kero] == 'u' ||GG[kero] == 'U')u++ ;
		else if(GG[kero] == 'v' ||GG[kero] == 'V')v++ ;
		else if(GG[kero] == 'w' ||GG[kero] == 'W')w++ ;
		else if(GG[kero] == 'x' ||GG[kero] == 'X')x++ ;
		else if(GG[kero] == 'y' ||GG[kero] == 'Y')y++ ;
		else if(GG[kero] == 'z' ||GG[kero] == 'Z')z++ ;
		else if(GG[kero] == '\n')break;
		}

	}
	cout << "a : " << a << endl;
	cout << "b : " << b << endl;
	cout << "c : " << c << endl;
	cout << "d : " << d << endl;
	cout << "e : " << e << endl;
	cout << "f : " << f << endl;
	cout << "g : " << g << endl;
	cout << "h : " << h << endl;
	cout << "i : " << i << endl;
	cout << "j : " << j << endl;
	cout << "k : " << k << endl;
	cout << "l : " << l << endl;
	cout << "m : " << m << endl;
	cout << "n : " << n << endl;
	cout << "o : " << o << endl;
	cout << "p : " << p << endl;
	cout << "q : " << q << endl;
	cout << "r : " << r << endl;
	cout << "s : " << s << endl;
	cout << "t : " << t << endl;
	cout << "u : " << u << endl;
	cout << "v : " << v << endl;
	cout << "w : " << w << endl;
	cout << "x : " << x << endl;
	cout << "y : " << y << endl;
	cout << "z : " << z << endl;

	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:15: error: 'srelen' was not declared in this scope; did you mean 'strnlen'?
    9 |         num = srelen(GG);
      |               ^~~~~~
      |               strnlen
Language: C++

#include <iostream>

using namespace std;

int countStr(const char c){
   if(c >= 65 && c <= 90)
      return c - 'A';
   else if(c >= 97 && c <= 122)
      return c - 'a';
   else return;
}

int main(void){
   int count[26] = {0};

   while(1){
    char c;
    cin >> c;

    if(c == '.') break;

    count[countStr(c)]++;
    
   }

   return 0;
}

Compiler output:
a.cc: In function 'int countStr(char)':
a.cc:10:9: error: return-statement with no value, in function returning 'int' [-fpermissive]
   10 |    else return;
      |         ^~~~~~
Language: C++

#include <iostream>

using namespace std;

int countStr(const char c){
   if(c >= 65 && c <= 90)
      return c - 'A';
   else if(c >= 97 && c <= 122)
      return c - 'a';
   
   return NULL; 
}

int main(void){
   int count[26] = {0};

   while(1){
    char c;
    int check;
    cin >> c;

    if(c == '.') break;
    
    check = countStr(c)
    
    if(check != NULL)
      count[check]++;
    else 
      ;
    
   }

   return 0;
}

Compiler output:
a.cc: In function 'int countStr(char)':
a.cc:11:11: warning: converting to non-pointer type 'int' from NULL [-Wconversion-null]
   11 |    return NULL;
      |           ^~~~
a.cc: In function 'int main()':
a.cc:24:24: error: expected ';' before 'if'
   24 |     check = countStr(c)
      |                        ^
      |                        ;
   25 | 
   26 |     if(check != NULL)
      |     ~~                  
a.cc:28:5: error: 'else' without a previous 'if'
   28 |     else
      |     ^~~~
Language: C++

#include <iostream>
#include <stdio.h>
using namespace std;

	int main(void) {
		int count[26] = { 0 };

		while (1) {
			char c;
			int check;
			cin >> c;

			if (c == '.') break;

			check = countStr(c);

			if (c >= 65 && c <= 90)
				count[c - 'A']++;
			else if (c >= 97 && c <= 122)
                                count[c - 'a']++;
		}

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

Compiler output:
a.cc: In function 'int main()':
a.cc:15:33: error: 'countStr' was not declared in this scope; did you mean 'count'?
   15 |                         check = countStr(c);
      |                                 ^~~~~~~~
      |                                 count
Language: C++

#include <iostream>
#include <string>
usin namespace std;

int main(){
 char c,c2,c3;
 int n;
 int cnt[26]={0};

 while (cin>>c){
  c2=tolower(c);
  n=c2-'a';
  cnt[n]++;
 }
 for(int i=0;i<26;i++){
  c3='a'+i;
  cout << c3 << " : " << cnt[i] << endl;
 }

 return 0;
}

Compiler output:
a.cc:3:1: error: 'usin' does not name a type
    3 | usin namespace std;
      | ^~~~
a.cc: In function 'int main()':
a.cc:10:9: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
   10 |  while (cin>>c){
      |         ^~~
      |         std::cin
In file included from a.cc:1:
/usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here
   62 |   extern istream cin;           ///< Linked to standard input
      |                  ^~~
a.cc:17:3: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   17 |   cout << c3 << " : " << cnt[i] << endl;
      |   ^~~~
      |   std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
a.cc:17:36: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
   17 |   cout << c3 << " : " << cnt[i] << endl;
      |                                    ^~~~
      |                                    std::endl
In file included from /usr/include/c++/14/iostream:41:
/usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here
  744 |     endl(basic_ostream<_CharT, _Traits>& __os)
      |     ^~~~
Language: C++

#include<iostream>

int main(void){
    char letter,ch;
    int count[26]={};
    while(std::cin>>letter){
         if(std::isalpha(letter)){
              ++count[std::tolower(letter)-'a'];
         }
    }
    for(int i=0;i<26;i++){
        ch='a'+i;
        std::cout<<ch<<:<<count[i]<<std::endl;
    }
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:13:24: error: expected primary-expression before ':' token
   13 |         std::cout<<ch<<:<<count[i]<<std::endl;
      |                        ^
Language: C++

s = input()
a = [0 for i in range(26)]
for j in range(len(s)):
    if ord(s[j])-ord("a") >=0 and ord(s[j])-ord("a") <26 :
        a[ord(s[j])-ord("a")]+=1
    elif ord(s[j])-ord("A") >=0 and ord(s[j])-ord("A") <26 :
        a[ord(s[j])-ord("A")]+=1
for k in range(26):
    print(chr(97+k)," : ",a[k])

Compiler output:
a.cc:1:1: error: 's' does not name a type
    1 | s = input()
      | ^
Language: C++

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

int main ()
{
	char kata[1200];
	while (gets(kata))
	{
		int a[26], length, dec=97;
		char alpa[26];
		for (int i=0; i<26; i++)
		{
			alpa[i] = dec;
			dec++;
		}
		for (int i=0; i<26; i++)
			a[i] = 0;
		
		length = strlen(kata);
		for (int i=0; i<length; i++)
		{
			if (kata[i]=='a' || kata[i]=='A') a[0]++;				 
			else if (kata[i]=='b' || kata[i]=='B') a[1]++;
			else if (kata[i]=='c' || kata[i]=='C') a[2]++;
			else if (kata[i]=='d' || kata[i]=='D') a[3]++;
			else if (kata[i]=='e' || kata[i]=='E') a[4]++;
			else if (kata[i]=='f' || kata[i]=='F') a[5]++;
			else if (kata[i]=='g' || kata[i]=='G') a[6]++;
			else if (kata[i]=='h' || kata[i]=='H') a[7]++;
			else if (kata[i]=='i' || kata[i]=='I') a[8]++;
			else if (kata[i]=='j' || kata[i]=='J') a[9]++;
			else if (kata[i]=='k' || kata[i]=='K') a[10]++;
			else if (kata[i]=='l' || kata[i]=='L') a[11]++;
			else if (kata[i]=='m' || kata[i]=='M') a[12]++;
			else if (kata[i]=='n' || kata[i]=='N') a[13]++;
			else if (kata[i]=='o' || kata[i]=='O') a[14]++;
			else if (kata[i]=='p' || kata[i]=='P') a[15]++;
			else if (kata[i]=='q' || kata[i]=='Q') a[16]++;
			else if (kata[i]=='r' || kata[i]=='R') a[17]++;
			else if (kata[i]=='s' || kata[i]=='S') a[18]++;
			else if (kata[i]=='t' || kata[i]=='T') a[19]++;
			else if (kata[i]=='u' || kata[i]=='U') a[20]++;
			else if (kata[i]=='v' || kata[i]=='V') a[21]++;
			else if (kata[i]=='w' || kata[i]=='W') a[22]++;
			else if (kata[i]=='x' || kata[i]=='X') a[23]++;
			else if (kata[i]=='y' || kata[i]=='Y') a[24]++;
			else if (kata[i]=='z' || kata[i]=='Z') a[25]++;	
		}
		for (int i=0; i<26; i++)
		{
			cout << alpa[i] << " : " << a[i] << endl;
		}
	}
	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(kata))
      |                ^~~~
      |                getw
Language: C++

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

int main ()
{
	char kata[1200];
	gets(kata);
	
		int a[26], length, dec=97;
		char alpa[26];
		for (int i=0; i<26; i++)
		{
			alpa[i] = dec;
			dec++;
		}
		for (int i=0; i<26; i++)
			a[i] = 0;
		
		length = strlen(kata);
		for (int i=0; i<length; i++)
		{
			if (kata[i]=='a' || kata[i]=='A') a[0]++;				 
			else if (kata[i]=='b' || kata[i]=='B') a[1]++;
			else if (kata[i]=='c' || kata[i]=='C') a[2]++;
			else if (kata[i]=='d' || kata[i]=='D') a[3]++;
			else if (kata[i]=='e' || kata[i]=='E') a[4]++;
			else if (kata[i]=='f' || kata[i]=='F') a[5]++;
			else if (kata[i]=='g' || kata[i]=='G') a[6]++;
			else if (kata[i]=='h' || kata[i]=='H') a[7]++;
			else if (kata[i]=='i' || kata[i]=='I') a[8]++;
			else if (kata[i]=='j' || kata[i]=='J') a[9]++;
			else if (kata[i]=='k' || kata[i]=='K') a[10]++;
			else if (kata[i]=='l' || kata[i]=='L') a[11]++;
			else if (kata[i]=='m' || kata[i]=='M') a[12]++;
			else if (kata[i]=='n' || kata[i]=='N') a[13]++;
			else if (kata[i]=='o' || kata[i]=='O') a[14]++;
			else if (kata[i]=='p' || kata[i]=='P') a[15]++;
			else if (kata[i]=='q' || kata[i]=='Q') a[16]++;
			else if (kata[i]=='r' || kata[i]=='R') a[17]++;
			else if (kata[i]=='s' || kata[i]=='S') a[18]++;
			else if (kata[i]=='t' || kata[i]=='T') a[19]++;
			else if (kata[i]=='u' || kata[i]=='U') a[20]++;
			else if (kata[i]=='v' || kata[i]=='V') a[21]++;
			else if (kata[i]=='w' || kata[i]=='W') a[22]++;
			else if (kata[i]=='x' || kata[i]=='X') a[23]++;
			else if (kata[i]=='y' || kata[i]=='Y') a[24]++;
			else if (kata[i]=='z' || kata[i]=='Z') a[25]++;	
		}
		for (int i=0; i<26; i++)
		{
			cout << alpa[i] << " : " << a[i] << endl;
		}
	
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:9: error: 'gets' was not declared in this scope; did you mean 'getw'?
    8 |         gets(kata);
      |         ^~~~
      |         getw
Language: C++

#include <iostream>
#include <string.h>
#include <stdio.h>
using namespace std;

int main ()
{
	char kata[1200];
	gets(kata);
	
		int a[26], length, dec=97;
		char alpa[26];
		for (int i=0; i<26; i++)
		{
			alpa[i] = dec;
			dec++;
		}
		for (int i=0; i<26; i++)
			a[i] = 0;
		
		length = strlen(kata);
		for (int i=0; i<length; i++)
		{
			if (kata[i]=='a' || kata[i]=='A') a[0]++;				 
			else if (kata[i]=='b' || kata[i]=='B') a[1]++;
			else if (kata[i]=='c' || kata[i]=='C') a[2]++;
			else if (kata[i]=='d' || kata[i]=='D') a[3]++;
			else if (kata[i]=='e' || kata[i]=='E') a[4]++;
			else if (kata[i]=='f' || kata[i]=='F') a[5]++;
			else if (kata[i]=='g' || kata[i]=='G') a[6]++;
			else if (kata[i]=='h' || kata[i]=='H') a[7]++;
			else if (kata[i]=='i' || kata[i]=='I') a[8]++;
			else if (kata[i]=='j' || kata[i]=='J') a[9]++;
			else if (kata[i]=='k' || kata[i]=='K') a[10]++;
			else if (kata[i]=='l' || kata[i]=='L') a[11]++;
			else if (kata[i]=='m' || kata[i]=='M') a[12]++;
			else if (kata[i]=='n' || kata[i]=='N') a[13]++;
			else if (kata[i]=='o' || kata[i]=='O') a[14]++;
			else if (kata[i]=='p' || kata[i]=='P') a[15]++;
			else if (kata[i]=='q' || kata[i]=='Q') a[16]++;
			else if (kata[i]=='r' || kata[i]=='R') a[17]++;
			else if (kata[i]=='s' || kata[i]=='S') a[18]++;
			else if (kata[i]=='t' || kata[i]=='T') a[19]++;
			else if (kata[i]=='u' || kata[i]=='U') a[20]++;
			else if (kata[i]=='v' || kata[i]=='V') a[21]++;
			else if (kata[i]=='w' || kata[i]=='W') a[22]++;
			else if (kata[i]=='x' || kata[i]=='X') a[23]++;
			else if (kata[i]=='y' || kata[i]=='Y') a[24]++;
			else if (kata[i]=='z' || kata[i]=='Z') a[25]++;	
		}
		for (int i=0; i<26; i++)
		{
			cout << alpa[i] << " : " << a[i] << endl;
		}
	
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:9: error: 'gets' was not declared in this scope; did you mean 'getw'?
    9 |         gets(kata);
      |         ^~~~
      |         getw
Language: C++

# Belongs to : midandfeed aka asilentvoice
import string
s = str(input()).lower()
alphabet = string.ascii_lowercase
ans = [0]*26
for x in s:	
	if x in alphabet:
		ans[ ord(x)-ord('a') ] += 1
	
for i in range(len(ans)):
	print("{} : {}".format(chr(i+ord('a')), ans[i]))
	

Compiler output:
a.cc:1:3: error: invalid preprocessing directive #Belongs
    1 | # Belongs to : midandfeed aka asilentvoice
      |   ^~~~~~~
a.cc:2:1: error: 'import' does not name a type
    2 | import string
      | ^~~~~~
a.cc:2:1: note: C++20 'import' only available with '-fmodules-ts'
Language: C++

#include<stdio.h>
#include<ctype.h>
int?????????(){
  int i???c???
  int cnt{200=0}???
  ??????c=getchar()??????=EOF){
    cnt[c]++???
  }
  ???????????????i=97???i<=122???i++???
    printf??????%c???????????????%d\n??????i???cnt[i]??????
  }
}

Compiler output:
a.cc:3:11: warning: trigraph ??( ignored, use -trigraphs to enable [-Wtrigraphs]
    3 | int?????????(){
a.cc:6:24: warning: trigraph ??= ignored, use -trigraphs to enable [-Wtrigraphs]
    6 |   ??????c=getchar()??????=EOF){
a.cc:10:36: error: stray '\' in program
   10 |     printf??????%c???????????????%d\n??????i???cnt[i]??????
      |                                    ^
a.cc:3:4: error: expected unqualified-id before '?' token
    3 | int?????????(){
      |    ^
a.cc:12:1: error: expected declaration before '}' token
   12 | }
      | ^
Language: C++

#include<iostream>#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:1:19: warning: extra tokens at end of #include directive
    1 | #include<iostream>#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;}
      |                   ^
/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/14/../../../x86_64-linux-gnu/Scrt1.o: in function `_start':
(.text+0x17): undefined reference to `main'
collect2: error: ld returned 1 exit status
Language: C++

#include <iostream>

using namespace std;

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

	while(cin >> ch){
		for(int i = 0; i < static_cast<int>(str.size()); i++){
			if('a' <= ch && ch <= 'z'){
				numAlpha[ch - 'a']++;
			}else if('A' <= ch && ch <= 'Z'){
				numAlpha[ch - 'A']++;
			}
		}
	}

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

	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:53: error: 'str' was not declared in this scope; did you mean 'std'?
   10 |                 for(int i = 0; i < static_cast<int>(str.size()); i++){
      |                                                     ^~~
      |                                                     std
Language: C++

#include <iostream>
#include <cctype>
#include <stdio.h>
using namespace std;

char ch;
int main(){
	long long count[30] = {0};
	while(scanf("%c",&ch) != EOF){
		if(islower(ch)){
			int num = ch-'a';
		}else if(isupper(ch)){
			int num = ch-'A';
		}else{
			continue;
			count[num]++;
		}
	}
	for(int i=0;i<=25;i++){
		printf("%c : %d\n",'a' + i,count[i]);
	}
}


Compiler output:
a.cc: In function 'int main()':
a.cc:16:31: error: 'num' was not declared in this scope; did you mean 'enum'?
   16 |                         count[num]++;
      |                               ^~~
      |                               enum
Language: C++

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

const int letter_MAX=1200;
int co[26];
char letter[letter_MAX];


int main(){
	scanf_s("%[^\n]", letter,letter_MAX);
	for (int i = 0; i < 26; i++){
		co[i] = 0;
		for (int j = 0; j < (unsigned int)strlen(letter); j++){
			letter[j] = tolower(letter[j]);
			if (i == letter[j] - 'a')co[i]++;
		}
	}
	for (int i = 0; i < 26; i++){
		char a = i + 'a';
		cout << a << " : " << co[i] << endl;
	}
	return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:13:9: error: 'scanf_s' was not declared in this scope; did you mean 'scanf'?
   13 |         scanf_s("%[^\n]", letter,letter_MAX);
      |         ^~~~~~~
      |         scanf
Language: C++

#include<bits/stdc++.h>
using namespace std;

int main(){
    map< char , int > count;
    string str;
    while( cin>>str ){
        
        for(int i=0;i<(int)str.size();i++){
            if( isupper(str[i]) ){
                str[i]=tolower(str[i]);
            }
        }
        
        for(int =0;i<(int)str.size();i++){
            count[ str[i] ]++;
        }
    }
    for(char ch='a';ch<+'z';ch++){
        cout<<ch<<" : "<<count[ch]<<endl;
    }
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:15:17: error: expected unqualified-id before '=' token
   15 |         for(int =0;i<(int)str.size();i++){
      |                 ^
a.cc:15:16: error: expected ';' before '=' token
   15 |         for(int =0;i<(int)str.size();i++){
      |                ^~
      |                ;
a.cc:15:17: error: expected primary-expression before '=' token
   15 |         for(int =0;i<(int)str.size();i++){
      |                 ^
a.cc:15:20: error: 'i' was not declared in this scope
   15 |         for(int =0;i<(int)str.size();i++){
      |                    ^
a.cc:15:37: error: expected ')' before ';' token
   15 |         for(int =0;i<(int)str.size();i++){
      |            ~                        ^
      |                                     )
a.cc:15:38: error: 'i' was not declared in this scope
   15 |         for(int =0;i<(int)str.size();i++){
      |                                      ^
Language: C++

#include<bits/stdc++.h>
using namespace std;

int main(){
    map< char , int > count;
    string str;
    while( cin>>str ){
        for(int i=0;i<(int)str.size();i++){
            if( isupper(str[i]) ){
                str[i]=tolower(str[i]);
            }
        }
        for(int =0;i<(int)str.size();i++){
            count[ str[i] ]++;
        }
    }
    for(char ch='a';ch<='z';ch++){
        cout<<ch<<" : "<<count[ch]<<endl;
    }
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:13:17: error: expected unqualified-id before '=' token
   13 |         for(int =0;i<(int)str.size();i++){
      |                 ^
a.cc:13:16: error: expected ';' before '=' token
   13 |         for(int =0;i<(int)str.size();i++){
      |                ^~
      |                ;
a.cc:13:17: error: expected primary-expression before '=' token
   13 |         for(int =0;i<(int)str.size();i++){
      |                 ^
a.cc:13:20: error: 'i' was not declared in this scope
   13 |         for(int =0;i<(int)str.size();i++){
      |                    ^
a.cc:13:37: error: expected ')' before ';' token
   13 |         for(int =0;i<(int)str.size();i++){
      |            ~                        ^
      |                                     )
a.cc:13:38: error: 'i' was not declared in this scope
   13 |         for(int =0;i<(int)str.size();i++){
      |                                      ^
Language: C++

#include<bits/stdc++.h>
using namespace std;

int main(){
    map<char , int> count;
    string s;
    
    while(cin >> s){
        
        for(int i=0;i<(int)s.size(); ++i){
            if( isupper(str[i])){
                s[i] = tolower(s[i]);
            }
        }
        
        for(int i=0;i<(int)s.size(); ++i){
            count[s[i]]++;
        }
    }
    
    
    for(char ch = 'a'; ch<='z'; ++ch){
        cout << ch << " : " << count[ch] << endl;
    }
}


Compiler output:
a.cc: In function 'int main()':
a.cc:11:25: error: 'str' was not declared in this scope; did you mean 'std'?
   11 |             if( isupper(str[i])){
      |                         ^~~
      |                         std
Language: C++

#include<bits/stdc++.h>
using namespace std;

int main(){
    map<char , int> count;
    string s;
    
    while(cin >> s){
        
        for(int i=0;i<(int)s.size(); ++i){
            if( isupper(str[i])){
                s[i] = tolower(s[i]);
            }
        }
        
        for(int i=0;i<(int)s.size(); ++i){
            count[s[i]]++;
        }
    }
    
    
    for(char ch = 'a'; ch<='z'; ++ch){
        cout << ch << " : " << count[ch] << endl;
    }
    
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:11:25: error: 'str' was not declared in this scope; did you mean 'std'?
   11 |             if( isupper(str[i])){
      |                         ^~~
      |                         std
Language: C++

#include<bits/stdc++.h>
using namespace std;

int main(){
    map< char , int > count;
    string str;
    while( cin >>str){
        for(int i=0;i<(int)str.size();i++){
            if(isupper(str[i])){
                str[i]=tolower(str[i]);
            }
        }
        
        for(int i=0;i<(int)str.size();i++){
            count[ str[i]]++;
            
        }
    }
    for (char ch='a';ch<='z';ch++){
        cout<ch<<" : "<<count[ch]<<endl;
    }
    return 0;
}


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

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

int main(){

    char str0[100];
    char str1[100];
    char str2[100];
    scanf("%s",str0);
    scanf("%s",str2);
    int i = strlen(str0);
    for(int j = 0;j<100/i;j++){
        for(int k=0;k<i;k++){
            str1[(k+1)*j] = str0[k];
        }
    }
    if(strstr(str1,str2)== NULL)printf("No\n");
    else printf("Yes\n");
    
    retrun 0;
    
}


Compiler output:
a.cc: In function 'int main()':
a.cc:23:5: error: 'retrun' was not declared in this scope
   23 |     retrun 0;
      |     ^~~~~~
Language: C++

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

int main(){
	int count[26];/*出現回数を数える変数を文字の種類分だけ用意*/
	for(int i=0;i<26;i++){
		count[i] = 0;
	}
	while(1){ //
		char s[1201];
		//int ret = scanf("%[^\n]",s);
		if(gets(s) == NULL){ 
			break;
		}

		int n = strlen(s); //文字列の長さを返す
		//while (s[i] == true){/*配列strのi番目の文字がNULL文字(文字列の終端)ではない間*/
		for(int i = 0;i<n;i++){
			if (s[i] >= 'a' && s[i] <= 'z'){
				count[(int)s[i] - 'a']++;/*小文字*/
			}
			else if (s[i] >= 'A' && s[i] <= 'Z'){
				count[(int)s[i] - 'A']++;/*大文字*/

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


	/*
	   与えられた英文に含まれる
	   各アルファベットの数を数えるプログラムを作成して下さいなお
	   小文字と大文字は区別しません。
	   */





Compiler output:
a.cc: In function 'int main()':
a.cc:12:20: error: 'gets' was not declared in this scope; did you mean 'getw'?
   12 |                 if(gets(s) == NULL){
      |                    ^~~~
      |                    getw
Language: C++


#include<cstdio>

int main(){
    int count[26];
	for(int i = 0;i < 26;i++) {
		count[i] = 0;
	}
	char s[1200];
	while(fgets(s,1200,stdin) != NULL) {
        for(int i = 0; i < 26;){
            if(s[i] == 'a' + 26 || s[i] == 'a' + 26){
                count[i]++;
            }
        }

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



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


// #include<cstdio>

// int main(){
//     int count[26];
// 	for(int i = 0; i < 26; i++){
//         count[i] = 0;
// 	}
// 	char s[1201];
// 	while(fgets(s,1201,stdin) != NULL){
//         for(int i = 0; s[i] != 'EOF'; i++){
//             for(int j = 0; j < 26; j++){
//                 if(s[i] - 'A' == j || s[i] - 'a' == j){
//                     count[j] = count[j] + 1;
//                 }
//             }
//         }
//         for(int i = 0;i < 26;i++) {
//             printf("%c : %d\n",'a' + i,count[i]);
//         }
//     }

//     return 0;
// }


Compiler output:
/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/14/../../../x86_64-linux-gnu/Scrt1.o: in function `_start':
(.text+0x17): undefined reference to `main'
collect2: error: ld returned 1 exit status
Language: C++


// #include<cstdio>

// int main(){
//     int count[26];
// 	for(int i = 0; i < 26; i++){
//         count[i] = 0;
// 	}
// 	char s[1201];
// 	while(fgets(s,1201,stdin) != NULL){
//         for(int i = 0; s[i] != EOF; i++){
//             for(int j = 0; j < 26; j++){
//                 if(s[i] - 'A' == j || s[i] - 'a' == j){
//                     count[j] = count[j] + 1;
//                 }
//             }
//         }
//         for(int i = 0;i < 26;i++) {
//             printf("%c : %d\n",'a' + i,count[i]);
//         }
//     }

//     return 0;
// }


Compiler output:
/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/14/../../../x86_64-linux-gnu/Scrt1.o: in function `_start':
(.text+0x17): undefined reference to `main'
collect2: error: ld returned 1 exit status
Language: C++


#include<cstdio>

int main(){
    int count[26];
	for(int i = 0; i < 26; i++){
        count[i] = 0;
	}
	char s[1201];
	while(fgets(s,1201,stdin) != NULL){
            for(int j = 0; j < 26; j++){
                if(s[i] - 'A' == j || s[i] - 'a' == j){
                    count[j] = count[j] + 1;
                }
            }
        for(int i = 0;i < 26;i++) {
            printf("%c : %d\n",'a' + i,count[i]);
        }
    }

    return 0;
}


// #include<cstdio>

// int main(){
//     int i,j,n,count[100];
//     for(int i = 0; i < 100; i++){
//         count[i] = 0;
//  	}
//     char ch;
//     while(scanf("%c",&ch)!=EOF){
//         if(ch>='a' && ch<='z'){
//             count[ch-'a']++;
//         }
//         else if(ch>='A'&& ch<='Z'){
//             count[ch-'A']++;
//         }
//     }
//     for(j=0;j<26;j++){
//         printf("%c : %d\n",j+'a',count[j]);
//     }
//     return 0;
// }


Compiler output:
a.cc: In function 'int main()':
a.cc:12:22: error: 'i' was not declared in this scope
   12 |                 if(s[i] - 'A' == j || s[i] - 'a' == j){
      |                      ^
Language: C++


#include<cstdio>

int main(){
    int count[26];
	for(int i = 0; i < 26; i++){
        count[i] = 0;
	}
	char s[1201];
	while(fgets(s,1201,stdin) != NULL){
            for(int j = 0; j < 26; j++){
                if(s[i] - 'A' == j || s[i] - 'a' == j){
                    count[j] = count[j] + 1;
                }
            }
        for(int i = 0;i < 26;i++) {
            printf("%c : %d\n",'a' + i,count[i]);
        }
    }

    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:12:22: error: 'i' was not declared in this scope
   12 |                 if(s[i] - 'A' == j || s[i] - 'a' == j){
      |                      ^
Language: C++

#include "stdafx.h"
#include <iostream>
#include <string>
using namespace std;

int main()
{
	int no[26] = { 0 };
	while (true)
	{
		char c;
		c = cin.get();
		if (c == EOF) break;
		int c2 = c;
		if ('A' <= c2 && 'Z' >= c2)
		{
			c2 = c + 32;
		}
		no[c2 - 97] ++;
	}
	for (int i = 0; i < 26; i++)
	{
		char a = 97 + i;
		//cout << "a";
		cout << a << " : " << no[i] << endl;
	}
}


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 <string>
using namespace std;

int main()
{
	int no[26] = { 0 };
	while (true)
	{
		char c;
		c = cin.get();
		if (cin.eof()) break;
		int c2 = c;
		if ('A' <= c2 && 'Z' >= c2)
		{
			c2 = c + 32;
		}
		no[c2 - 97] ++;
	}
	for (int i = 0; i < 26; i++)
	{
		char a = 97 + i;
		//cout << "a";
		cout << a << " : " << no[i] << endl;
	}
}


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


#include<iostream>
#include<string> 
using namespace std; 
int main(){ 

string a;
 
int ab[26]={}; 

int i; 

while(getline(cin,a)){ 
for(i=0;i<str.size();i++){ 
 if(a[i]>='a'&&a[i]<='z') ab[a[i]-'a']++;
 else if(a[i]>='A'&&sta[i]<='Z') ab[a[i]-'A']++;
}

cout << a << endl;

}

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

return 0;
} 


Compiler output:
a.cc: In function 'int main()':
a.cc:14:11: error: 'str' was not declared in this scope; did you mean 'std'?
   14 | for(i=0;i<str.size();i++){
      |           ^~~
      |           std
a.cc:16:21: error: 'sta' was not declared in this scope; did you mean 'std'?
   16 |  else if(a[i]>='A'&&sta[i]<='Z') ab[a[i]-'A']++;
      |                     ^~~
      |                     std
Language: C++


#include<iostream>
#include<string> 
using namespace std; 
int main(){ 

string a;
 
int ab[26]={}; 

int i; 

while(getline(cin,a)){ 
for(i=0;i<a.size();i++){ 
 if(a[i]>='a'&&a[i]<='z') ab[a[i]-'a']++;
 else if(a[i]>='A'&&sta[i]<='Z') ab[a[i]-'A']++;
}

cout << a << endl;

}

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

return 0;
} 


Compiler output:
a.cc: In function 'int main()':
a.cc:16:21: error: 'sta' was not declared in this scope; did you mean 'std'?
   16 |  else if(a[i]>='A'&&sta[i]<='Z') ab[a[i]-'A']++;
      |                     ^~~
      |                     std
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main(){
    map < char ;
    int count;
    string str;
    while(cin>>str){
        for(int i=0;i<(int)str.size();i++){
            if( isupper(str[i]) ){
                str[i]=tolower(str[i]);
            }
        }
        for(int i=0;i<(int)str.size();i++){
            count[ str[i] ]++;
        }
    }
    
    for(char ch='a';ch<='z';ch++){
        count<<ch<<" : "<<count[ch]<<endl;
    }
    return 0;
    
    
}


Compiler output:
a.cc: In function 'int main()':
a.cc:4:11: error: wrong number of template arguments (1, should be at least 2)
    4 |     map < char ;
      |           ^~~~
In file included from /usr/include/c++/14/map:63,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:152,
                 from a.cc:1:
/usr/include/c++/14/bits/stl_map.h:102:11: note: provided for 'template<class _Key, class _Tp, class _Compare, class _Alloc> class std::map'
  102 |     class map
      |           ^~~
a.cc:14:18: error: invalid types 'int[__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type {aka char}]' for array subscript
   14 |             count[ str[i] ]++;
      |                  ^
a.cc:19:18: error: invalid operands of types 'int' and 'const char [4]' to binary 'operator<<'
   19 |         count<<ch<<" : "<<count[ch]<<endl;
      |         ~~~~~~~~~^~~~~~~
      |              |     |
      |              int   const char [4]
a.cc:19:32: error: invalid types 'int[char]' for array subscript
   19 |         count<<ch<<" : "<<count[ch]<<endl;
      |                                ^
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main(){
    map < char ;
    int count[10000];
    string str;
    while(cin>>str){
        for(int i=0;i<(int)str.size();i++){
            if( isupper(str[i]) ){
                str[i]=tolower(str[i]);
            }
        }
        for(int i=0;i<(int)str.size();i++){
            count[ str[i] ]++;
        }
    }
    
    for(char ch='a';ch<='z';ch++){
        count<<ch<<" : "<<count[ch]<<endl;
    }
    return 0;
    
    
}


Compiler output:
a.cc: In function 'int main()':
a.cc:4:11: error: wrong number of template arguments (1, should be at least 2)
    4 |     map < char ;
      |           ^~~~
In file included from /usr/include/c++/14/map:63,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:152,
                 from a.cc:1:
/usr/include/c++/14/bits/stl_map.h:102:11: note: provided for 'template<class _Key, class _Tp, class _Compare, class _Alloc> class std::map'
  102 |     class map
      |           ^~~
a.cc:19:14: error: invalid operands of types 'int [10000]' and 'char' to binary 'operator<<'
   19 |         count<<ch<<" : "<<count[ch]<<endl;
      |         ~~~~~^~~~
      |         |      |
      |         |      char
      |         int [10000]
Language: C++

#include<iostream>
using namespace std;


int main()
{
	char ch;
	int a[26] = {};
	while (cin >> ch) {
		if ('a' <= ch && ch <= 'z') {
			int x = ch - 'a';
			a[x]++;
		}
		else if ('A' <= ch && ch <= 'Z') {
			int y = ch - 'A';
			a[y]++;
		}

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


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

#include<bits/stdc++.h>
using namespace std;
int main(){
    map < char ;
    int > count;
    string str;
    while(cin>>str){
        for(int i=0;i<(int)str.size();i++){
            if( isupper(str[i]) ){
                str[i]=tolower(str[i]);
            }
        }
        for(int i=0;i<(int)str.size();i++){
            count[ str[i] ]++;
        }
    }
    
    for(char ch='a';ch<='z';ch++){
        count<<ch<<" : "<<count[ch]<<endl;
    }
    return 0;
    
    
}


Compiler output:
a.cc: In function 'int main()':
a.cc:4:11: error: wrong number of template arguments (1, should be at least 2)
    4 |     map < char ;
      |           ^~~~
In file included from /usr/include/c++/14/map:63,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:152,
                 from a.cc:1:
/usr/include/c++/14/bits/stl_map.h:102:11: note: provided for 'template<class _Key, class _Tp, class _Compare, class _Alloc> class std::map'
  102 |     class map
      |           ^~~
a.cc:5:9: error: expected unqualified-id before '>' token
    5 |     int > count;
      |         ^
a.cc:14:18: error: invalid types '<unresolved overloaded function type>[__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type {aka char}]' for array subscript
   14 |             count[ str[i] ]++;
      |                  ^
a.cc:19:14: error: invalid operands of types '<unresolved overloaded function type>' and 'char' to binary 'operator<<'
   19 |         count<<ch<<" : "<<count[ch]<<endl;
      |         ~~~~~^~~~
a.cc:19:32: error: invalid types '<unresolved overloaded function type>[char]' for array subscript
   19 |         count<<ch<<" : "<<count[ch]<<endl;
      |                                ^
Language: C++

import java.util.Scanner;
 
public class Main{
 
    // a～zの文字数を記録する配列
    static int[] CharCount = new int[26];
 
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
 
        // Ctrl+Zが押されるまで繰り返す
        while (sc.hasNext()) {
            // 入力と文字カウント
            CountingCharacters(sc.next());
        }
        // 表示
        Print();
 
    }
 
    // 文字列からa~zの文字をカウントする（大小文字区別なし）
    static void CountingCharacters(String str) {
 
        char[] c = str.toCharArray();
        for (int i = 0; i < c.length; i++) {
            for (int a = (int) 'A'; a < 1 + (int) 'Z'; a++) {
                if (Character.toUpperCase(c[i]) == (char) a) {
                    CharCount[a - (int) 'A']++;
                    break;
                }
            }
        }
    }
 
    // 表示処理
    static void Print() {
        for (int i = 0; i < CharCount.length; i++) {
            System.out.println((char) (i + (int) 'a') + " : " + CharCount[i]);
        }
    }
 
}



Compiler output:
a.cc:1:1: error: 'import' does not name a type
    1 | import java.util.Scanner;
      | ^~~~~~
a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:3:1: error: expected unqualified-id before 'public'
    3 | public class Main{
      | ^~~~~~
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main(){
    map<char,int>count;
    string str;
    while(cin>>str){
        for(int i=0;i<(int).size();i++){
            if(isupper(str[i])){
                str[i]=tolower(str[i]);
            }
        }
        for(int i=0;i<(int)str.size();i++){
            count[str[i]]++;
        }
    }
    for(char ch='a';ch<='z';ch++){
        cout<<ch<<" : "<<count[ch]<<endl;
    }
    return 0;
}


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

#include<bits/stdc++.h>
using namespace std;
int main(){
  map<char , int>count;
  string str;
  while( cin>>str ){
    for(int i=0;i<(int)str.size();i++){
      if(isupper(str[i])){
	str[i]=tolower(str[i]);
      }
    }
    
    for(int i=0;i<(int)str.size();i++){
      count[ str[i] ];++;
    }
  }

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


Compiler output:
a.cc: In function 'int main()':
a.cc:14:25: error: expected primary-expression before ';' token
   14 |       count[ str[i] ];++;
      |                         ^
Language: C++


#include<cstdio>

int main(){
    char ch;
    while(scanf("%c",&ch) != EOF){
        if(ch >= 'a' && ch <= 'z'){
            count[ch - 'a']++;
        }
        else if(ch >= 'A' && ch <= 'Z'){
            count[ch - 'A']++;
        }
    }
    for(int j = 0;j < 26; j++){
        printf("%c : %d\n",j + 'a',count[j]);
    }
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:8:13: error: 'count' was not declared in this scope
    8 |             count[ch - 'a']++;
      |             ^~~~~
a.cc:11:13: error: 'count' was not declared in this scope
   11 |             count[ch - 'A']++;
      |             ^~~~~
a.cc:15:36: error: 'count' was not declared in this scope
   15 |         printf("%c : %d\n",j + 'a',count[j]);
      |                                    ^~~~~
Language: C++

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

int main()
{
string a;
char g[26];
for(int i=0;i<26;i++) g[i]='a'+i;
int mum[26]={0};
for(;;){
getline(cin,a);
if((int)a.size()==0) break;
else{
for(int d=0;d<(int)a.size();d++){
for(int i=0;i<26;i++){
if('a'+i==a[d]||'A'+i==a[d]) mum[i]++;
}}}}
for(int i=0;i<26;i++) cout << g[i] << " : " << mum[i] << endl;

return 0;
}




Compiler output:
a.cc:2:9: fatal error:  string: No such file or directory
    2 | #include< string>
      |         ^~~~~~~~~
compilation terminated.
Language: C++

#include<bits/stdc++.h>
using namespace std;

int main(){
  string str;
  int a[26]={};

  while(getline(cin,str))
    {
      for(int i=0;i < str.size();i++)
	{
	  if(str[i] >= "A" && str[i] <= "Z") ab[str[i]-'A']++;
	  else if(str[i] >= "a" && str[i] <= "z") ab[str[i]-'a']++;
	}
    }
  for(int j=0;j < 26;j++)
    {
      cout << (char)('a'+1) << " : " << ab[j] << endl;
    }
  return 0;
}



Compiler output:
a.cc: In function 'int main()':
a.cc:12:21: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   12 |           if(str[i] >= "A" && str[i] <= "Z") ab[str[i]-'A']++;
a.cc:12:38: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   12 |           if(str[i] >= "A" && str[i] <= "Z") ab[str[i]-'A']++;
a.cc:12:46: error: 'ab' was not declared in this scope; did you mean 'a'?
   12 |           if(str[i] >= "A" && str[i] <= "Z") ab[str[i]-'A']++;
      |                                              ^~
      |                                              a
a.cc:13:26: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   13 |           else if(str[i] >= "a" && str[i] <= "z") ab[str[i]-'a']++;
a.cc:13:43: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   13 |           else if(str[i] >= "a" && str[i] <= "z") ab[str[i]-'a']++;
a.cc:13:51: error: 'ab' was not declared in this scope; did you mean 'a'?
   13 |           else if(str[i] >= "a" && str[i] <= "z") ab[str[i]-'a']++;
      |                                                   ^~
      |                                                   a
a.cc:18:41: error: 'ab' was not declared in this scope; did you mean 'a'?
   18 |       cout << (char)('a'+1) << " : " << ab[j] << endl;
      |                                         ^~
      |                                         a
Language: C++

#include<bits/stdc++.h>
using namespace std;

int main(){
  string str;
  int a[26]={};

  while(getline(cin,str))
    {
      for(int i=0;i < str.size();i++)
	{
	  if(str[i] >= "A" && str[i] <= "Z") a[str[i]-'A']++;
	  else if(str[i] >= "a" && str[i] <= "z") a[str[i]-'a']++;
	}
    }
  for(int j=0;j < 26;j++)
    {
      cout << (char)('a'+1) << " : " << a[j] << endl;
    }
  return 0;
}



Compiler output:
a.cc: In function 'int main()':
a.cc:12:21: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   12 |           if(str[i] >= "A" && str[i] <= "Z") a[str[i]-'A']++;
a.cc:12:38: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   12 |           if(str[i] >= "A" && str[i] <= "Z") a[str[i]-'A']++;
a.cc:13:26: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   13 |           else if(str[i] >= "a" && str[i] <= "z") a[str[i]-'a']++;
a.cc:13:43: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   13 |           else if(str[i] >= "a" && str[i] <= "z") a[str[i]-'a']++;