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

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

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

  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(i=0;i<26;i++){
    cout << (char)('a'+i) << " : " << ab[i] << endl;
  }
}



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

#include <iostream>
#include <string>
using namespace std;
int main(){
	int a[26];
	string s;
	getline(cin,s);
	int n=s.size();
	for(int i=0;i<n;i++){
		for(int p=0;p<26;p++){
			if(s[i]<='A')
				if(s[i]=='a'+p){
					a[p]++;
				}
			}
		}
		for()
	}




Compiler output:
a.cc: In function 'int main()':
a.cc:17:21: error: expected primary-expression before ')' token
   17 |                 for()
      |                     ^
a.cc:18:9: error: expected primary-expression before '}' token
   18 |         }
      |         ^
a.cc:17:22: error: expected ';' before '}' token
   17 |                 for()
      |                      ^
      |                      ;
   18 |         }
      |         ~             
a.cc:18:9: error: expected primary-expression before '}' token
   18 |         }
      |         ^
a.cc:17:22: error: expected ')' before '}' token
   17 |                 for()
      |                    ~ ^
      |                      )
   18 |         }
      |         ~             
a.cc:18:9: error: expected primary-expression before '}' token
   18 |         }
      |         ^
Language: C++

#include<iostream>
#include <string>
using namespace std;
int main() {
	int a[26];
	string s;
	while(cin, s);
	int i = s.size();
	for (int n = 0; n < 26; n++) {
		a[n] = 0;
	}
	for (int n = 0; n < 26; n++) {
		for (int p = 0; p < i; p++) {
			if (s[p] >= 'A' && s[p] <= 'Z') {
				s[p] = s[p] + 32;
			}
			if (s[n] == 'a' + p) {
				a[n]++;
			}
		}
	}
	for (int p = 0; p < 26; p++) {
		cout << p+1 << " : " << a[p] << endl;
	}
}


Compiler output:
a.cc: In function 'int main()':
a.cc:7:18: error: could not convert '((void)0, s)' from 'std::string' {aka 'std::__cxx11::basic_string<char>'} to 'bool'
    7 |         while(cin, s);
      |               ~~~^~~
      |                  |
      |                  std::string {aka std::__cxx11::basic_string<char>}
Language: C++

#include<iostream>
#include<cstdio>
#include<cctype>
using namespace std;
int main(){
    char ch;
    int count;
    while(1){
        cin >> ch;
        ch =
        
    }
}


Compiler output:
a.cc: In function 'int main()':
a.cc:12:5: error: expected primary-expression before '}' token
   12 |     }
      |     ^
Language: C++

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


Compiler output:
a.cc: In function 'int main()':
a.cc:12:18: error: invalid types 'int[int]' for array subscript
   12 |             count[ch-'a']++;
      |                  ^
a.cc:16:32: error: expected ';' before '}' token
   16 |         printf("%c:%d\n",i+'a')
      |                                ^
      |                                ;
   17 |     }
      |     ~
Language: C++

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


Compiler output:
a.cc: In function 'int main()':
a.cc:12:18: error: invalid types 'int[int]' for array subscript
   12 |             count[ch-'a']++;
      |                  ^
a.cc:16:37: error: invalid types 'int[int]' for array subscript
   16 |         printf("%c:%d\n",i+'a',count[i]);
      |                                     ^
Language: C++

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


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

#include <iostream>
using namespace std;
int main(){
    int num;
    int counter[25];
    char ch;
    while(cin>>ch){
        num = ch -'a';
        counter[num]++;
    }
    for(int i=0;i<26;i++){
        cout<<'a'+i <<" : "<<couter[i]<<endl;
    }
return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:12:30: error: 'couter' was not declared in this scope; did you mean 'counter'?
   12 |         cout<<'a'+i <<" : "<<couter[i]<<endl;
      |                              ^~~~~~
      |                              counter
Language: C++

#include <iostream>
#include <stdio.h>
using namespace std;
int main(){
    int num=0;
    int counter[26]={};
    char ch;
    while(cin>>ch){
        cin>>ch;
        if(ch<='z')`{
            num = ch -'a';
            counter[num]++;
        }
        else{
            num = ch - 'A';
            counter[num]++;
        }
    }
    for(int i=0;i<26;i++){
        cout<<(char)('a'+i)<<" : "<<counter[i]<<endl;
    }
return 0;
}


Compiler output:
a.cc:10:20: error: stray '`' in program
   10 |         if(ch<='z')`{
      |                    ^
Language: C++

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

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


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

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

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


Compiler output:
a.cc: In function 'int main()':
a.cc:11:9: error: 'str' was not declared in this scope; did you mean 'std'?
   11 |         str = tolower(ch);
      |         ^~~
      |         std
Language: C++

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

int main() {
    char ch;
    int count[26] = {};
    
    while(cin >> ch) {
        ch = tolower(ch);
        if (isalpha(ch)) {
            count[ch - 'a']++;
        }
    }
    for (int i = 0; i < 26; i++) {
        printf("%c : %d\n", i + 'a' ,count[i])
    }
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:17:47: error: expected ';' before '}' token
   17 |         printf("%c : %d\n", i + 'a' ,count[i])
      |                                               ^
      |                                               ;
   18 |     }
      |     ~
Language: C++

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


Compiler output:
a.cc: In function 'int main()':
a.cc:8:5: error: expected ',' or ';' before 'while'
    8 |     while(cin>>a){
      |     ^~~~~
Language: C++

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

int main(void){
    string str;
    int alphabet[26] ={};
    for (int i = 0; i < 26; i++){
        for (int j = 0; j < str.size(); j++){
            if ((str[j] == 65 + i) || (str[j] == 97 + i)){
                alphabet += 1;
            }
        }
    }
    for (int i = 0; i < 26; i++){
        printf("%c : %d\n", i + 97, alphabet[i])
    }
}


Compiler output:
a.cc: In function 'int main()':
a.cc:11:26: error: incompatible types in assignment of 'int' to 'int [26]'
   11 |                 alphabet += 1;
      |                 ~~~~~~~~~^~~~
a.cc:16:49: error: expected ';' before '}' token
   16 |         printf("%c : %d\n", i + 97, alphabet[i])
      |                                                 ^
      |                                                 ;
   17 |     }
      |     ~
Language: C++

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

int main(void){
    string str;
    cin >> str;
    int alphabet[26] ={};
    for (int i = 0; i < 26; i++){
        for (int j = 0; j < str.size(); j++){
            if ((str[j] == 65 + i) || (str[j] == 97 + i)){
                alphabet += 1;
            }
        }
    }
    for (int i = 0; i < 26; i++){
        printf("%c : %d\n", i + 97, alphabet[i])
    }
}


Compiler output:
a.cc: In function 'int main()':
a.cc:12:26: error: incompatible types in assignment of 'int' to 'int [26]'
   12 |                 alphabet += 1;
      |                 ~~~~~~~~~^~~~
a.cc:17:49: error: expected ';' before '}' token
   17 |         printf("%c : %d\n", i + 97, alphabet[i])
      |                                                 ^
      |                                                 ;
   18 |     }
      |     ~
Language: C++

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


Compiler output:
a.cc: In function 'int main()':
a.cc:8:5: error: expected ',' or ';' before 'while'
    8 |     while(cin>>a){
      |     ^~~~~
Language: C++

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

int main(void){
    string str;
    cin >> str;
    int alphabet[26] ={};
    for (int i = 0; i < 26; i++){
        for (int j = 0; j < str.size(); j++){
            if ((str[j] == 65 + i) || (str[j] == 97 + i)){
                alphabet[i] += 1;
            }
        }
    }
    for (int i = 0; i < 26; i++){
        printf("%c : %d\n", i + 97, alphabet[i])
    }
}


Compiler output:
a.cc: In function 'int main()':
a.cc:17:49: error: expected ';' before '}' token
   17 |         printf("%c : %d\n", i + 97, alphabet[i])
      |                                                 ^
      |                                                 ;
   18 |     }
      |     ~
Language: C++

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

int main(void){
    string str;
    cin.getline(str, sizeof(str));
    int alphabet[26] ={};
    for (int i = 0; i < 26; i++){
        for (int j = 0; j < str.size(); j++){
            if ((str[j] == 65 + i) || (str[j] == 97 + i)){
                alphabet[i] += 1;
            }
        }
    }
    for (int i = 0; i < 26; i++){
        printf("%c : %d\n", i + 97, alphabet[i]);
    }
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:8:16: error: no matching function for call to 'std::basic_istream<char>::getline(std::string&, long unsigned int)'
    8 |     cin.getline(str, sizeof(str));
      |     ~~~~~~~~~~~^~~~~~~~~~~~~~~~~~
In file included from /usr/include/c++/14/iostream:42,
                 from a.cc:1:
/usr/include/c++/14/istream:740:5: note: candidate: 'std::basic_istream<_CharT, _Traits>& std::basic_istream<_CharT, _Traits>::getline(char_type*, std::streamsize, char_type) [with _CharT = char; _Traits = std::char_traits<char>; char_type = char; std::streamsize = long int]'
  740 |     basic_istream<char>::
      |     ^~~~~~~~~~~~~~~~~~~
/usr/include/c++/14/istream:740:5: note:   candidate expects 3 arguments, 2 provided
/usr/include/c++/14/istream:520:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::getline(char_type*, std::streamsize) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>; char_type = char; std::streamsize = long int]'
  520 |       getline(char_type* __s, streamsize __n)
      |       ^~~~~~~
/usr/include/c++/14/istream:520:26: note:   no known conversion for argument 1 from 'std::string' {aka 'std::__cxx11::basic_string<char>'} to 'std::basic_istream<char>::char_type*' {aka 'char*'}
  520 |       getline(char_type* __s, streamsize __n)
      |               ~~~~~~~~~~~^~~
Language: C++

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

int main(void){
    string str;
    cin.getline(str, sizeof(str));
    int alphabet[26] ={};
    for (int i = 0; i < 26; i++){
        for (int j = 0; j < str.size(); j++){
            if ((str[j] == 65 + i) || (str[j] == 97 + i)){
                alphabet[i] += 1;
            }
        }
    }
    for (int i = 0; i < 26; i++){
        printf("%c : %d\n", i + 97, alphabet[i]);
    }
    return 0;
}


Compiler output:
a.cc:3:10: fatal error: conio.h: No such file or directory
    3 | #include <conio.h>
      |          ^~~~~~~~~
compilation terminated.
Language: C++

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

int main(void){
    string str;
    cin.getline(str, sizeof(str));
    int alphabet[26] ={};
    for (int i = 0; i < 26; i++){
        for (int j = 0; j < str.size(); j++){
            if ((str[j] == 65 + i) || (str[j] == 97 + i)){
                alphabet[i] += 1;
            }
        }
    }
    for (int i = 0; i < 26; i++){
        printf("%c : %d\n", i + 97, alphabet[i]);
    }
    return 0;
}


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

#include<iostream>
#include<cstdio>
#include<cctype>
using namespace std;
int main(){
    string a;
    int b[26];
    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'};
    char
    while(cin>>a){
        a=tolower(a);
        for(int i=0;i<a.size();i++){
            for(int j=0;j<26;j++){
                if(a[i]==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:10:5: error: expected unqualified-id before 'while'
   10 |     while(cin>>a){
      |     ^~~~~
Language: C++

#include<iostream>
#include<cstdio>
#include<cctype>
using namespace std;
int main(){
    string a;
    int b[26];
    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(cin>>a){
        a=tolower(a);
        for(int i=0;i<a.size();i++){
            for(int j=0;j<26;j++){
                if(a[i]==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:10:18: error: no matching function for call to 'tolower(std::string&)'
   10 |         a=tolower(a);
      |           ~~~~~~~^~~
In file included from /usr/include/c++/14/bits/basic_ios.h:37,
                 from /usr/include/c++/14/ios:46,
                 from /usr/include/c++/14/ostream:40,
                 from /usr/include/c++/14/iostream:41,
                 from a.cc:1:
/usr/include/c++/14/bits/locale_facets.h:2693:5: note: candidate: 'template<class _CharT> _CharT std::tolower(_CharT, const locale&)'
 2693 |     tolower(_CharT __c, const locale& __loc)
      |     ^~~~~~~
/usr/include/c++/14/bits/locale_facets.h:2693:5: note:   candidate expects 2 arguments, 1 provided
In file included from /usr/include/c++/14/cctype:42,
                 from /usr/include/c++/14/bits/localefwd.h:42,
                 from /usr/include/c++/14/ios:43:
/usr/include/ctype.h:122:12: note: candidate: 'int tolower(int)'
  122 | extern int tolower (int __c) __THROW;
      |            ^~~~~~~
/usr/include/ctype.h:122:25: note:   no known conversion for argument 1 from 'std::string' {aka 'std::__cxx11::basic_string<char>'} to 'int'
  122 | extern int tolower (int __c) __THROW;
      |                     ~~~~^~~
Language: C++

#include<iostream>
#include<cstdio>
#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(cin>>a){
        a=tolower(a);
        for(int i=0;i<a.size();i++){
            for(int j=0;j<26;j++){
                if(a[i]==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:10:18: error: no matching function for call to 'tolower(std::string&)'
   10 |         a=tolower(a);
      |           ~~~~~~~^~~
In file included from /usr/include/c++/14/bits/basic_ios.h:37,
                 from /usr/include/c++/14/ios:46,
                 from /usr/include/c++/14/ostream:40,
                 from /usr/include/c++/14/iostream:41,
                 from a.cc:1:
/usr/include/c++/14/bits/locale_facets.h:2693:5: note: candidate: 'template<class _CharT> _CharT std::tolower(_CharT, const locale&)'
 2693 |     tolower(_CharT __c, const locale& __loc)
      |     ^~~~~~~
/usr/include/c++/14/bits/locale_facets.h:2693:5: note:   candidate expects 2 arguments, 1 provided
In file included from /usr/include/c++/14/cctype:42,
                 from /usr/include/c++/14/bits/localefwd.h:42,
                 from /usr/include/c++/14/ios:43:
/usr/include/ctype.h:122:12: note: candidate: 'int tolower(int)'
  122 | extern int tolower (int __c) __THROW;
      |            ^~~~~~~
/usr/include/ctype.h:122:25: note:   no known conversion for argument 1 from 'std::string' {aka 'std::__cxx11::basic_string<char>'} to 'int'
  122 | extern int tolower (int __c) __THROW;
      |                     ~~~~^~~
Language: C++

#include<iostream>
#include<cstdio>
#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(cin>>a){
        a=tolower(a);
        for(int i=0;i<a.size();i++){
            for(int j=0;j<26;j++){
                if(a[i]==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:10:18: error: no matching function for call to 'tolower(std::string&)'
   10 |         a=tolower(a);
      |           ~~~~~~~^~~
In file included from /usr/include/c++/14/bits/basic_ios.h:37,
                 from /usr/include/c++/14/ios:46,
                 from /usr/include/c++/14/ostream:40,
                 from /usr/include/c++/14/iostream:41,
                 from a.cc:1:
/usr/include/c++/14/bits/locale_facets.h:2693:5: note: candidate: 'template<class _CharT> _CharT std::tolower(_CharT, const locale&)'
 2693 |     tolower(_CharT __c, const locale& __loc)
      |     ^~~~~~~
/usr/include/c++/14/bits/locale_facets.h:2693:5: note:   candidate expects 2 arguments, 1 provided
In file included from /usr/include/c++/14/cctype:42,
                 from /usr/include/c++/14/bits/localefwd.h:42,
                 from /usr/include/c++/14/ios:43:
/usr/include/ctype.h:122:12: note: candidate: 'int tolower(int)'
  122 | extern int tolower (int __c) __THROW;
      |            ^~~~~~~
/usr/include/ctype.h:122:25: note:   no known conversion for argument 1 from 'std::string' {aka 'std::__cxx11::basic_string<char>'} to 'int'
  122 | extern int tolower (int __c) __THROW;
      |                     ~~~~^~~
Language: C++

#include<iostream>
#include<cstdio>
#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)){
        a=tolower(a);
        for(int i=0;i<a.size();i++){
            for(int j=0;j<26;j++){
                if(a[i]==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:10:18: error: no matching function for call to 'tolower(std::string&)'
   10 |         a=tolower(a);
      |           ~~~~~~~^~~
In file included from /usr/include/c++/14/bits/basic_ios.h:37,
                 from /usr/include/c++/14/ios:46,
                 from /usr/include/c++/14/ostream:40,
                 from /usr/include/c++/14/iostream:41,
                 from a.cc:1:
/usr/include/c++/14/bits/locale_facets.h:2693:5: note: candidate: 'template<class _CharT> _CharT std::tolower(_CharT, const locale&)'
 2693 |     tolower(_CharT __c, const locale& __loc)
      |     ^~~~~~~
/usr/include/c++/14/bits/locale_facets.h:2693:5: note:   candidate expects 2 arguments, 1 provided
In file included from /usr/include/c++/14/cctype:42,
                 from /usr/include/c++/14/bits/localefwd.h:42,
                 from /usr/include/c++/14/ios:43:
/usr/include/ctype.h:122:12: note: candidate: 'int tolower(int)'
  122 | extern int tolower (int __c) __THROW;
      |            ^~~~~~~
/usr/include/ctype.h:122:25: note:   no known conversion for argument 1 from 'std::string' {aka 'std::__cxx11::basic_string<char>'} to 'int'
  122 | extern int tolower (int __c) __THROW;
      |                     ~~~~^~~
Language: C++

#include<iostream>
#include<string>
#include<cstdio>
#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)){
        a=tolower(a);
        for(int i=0;i<a.size();i++){
            for(int j=0;j<26;j++){
                if(a[i]==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:11:18: error: no matching function for call to 'tolower(std::string&)'
   11 |         a=tolower(a);
      |           ~~~~~~~^~~
In file included from /usr/include/c++/14/bits/basic_ios.h:37,
                 from /usr/include/c++/14/ios:46,
                 from /usr/include/c++/14/ostream:40,
                 from /usr/include/c++/14/iostream:41,
                 from a.cc:1:
/usr/include/c++/14/bits/locale_facets.h:2693:5: note: candidate: 'template<class _CharT> _CharT std::tolower(_CharT, const locale&)'
 2693 |     tolower(_CharT __c, const locale& __loc)
      |     ^~~~~~~
/usr/include/c++/14/bits/locale_facets.h:2693:5: note:   candidate expects 2 arguments, 1 provided
In file included from /usr/include/c++/14/cctype:42,
                 from /usr/include/c++/14/bits/localefwd.h:42,
                 from /usr/include/c++/14/ios:43:
/usr/include/ctype.h:122:12: note: candidate: 'int tolower(int)'
  122 | extern int tolower (int __c) __THROW;
      |            ^~~~~~~
/usr/include/ctype.h:122:25: note:   no known conversion for argument 1 from 'std::string' {aka 'std::__cxx11::basic_string<char>'} to 'int'
  122 | extern int tolower (int __c) __THROW;
      |                     ~~~~^~~
Language: C++

#include<iostream>
#include<string>
#include<cstdio>
#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)){
        a=tolower(a);
        for(int i=0;i<a.size();i++){
            for(int j=0;j<26;j++){
                if(a[i]==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:11:18: error: no matching function for call to 'tolower(std::string&)'
   11 |         a=tolower(a);
      |           ~~~~~~~^~~
In file included from /usr/include/c++/14/bits/basic_ios.h:37,
                 from /usr/include/c++/14/ios:46,
                 from /usr/include/c++/14/ostream:40,
                 from /usr/include/c++/14/iostream:41,
                 from a.cc:1:
/usr/include/c++/14/bits/locale_facets.h:2693:5: note: candidate: 'template<class _CharT> _CharT std::tolower(_CharT, const locale&)'
 2693 |     tolower(_CharT __c, const locale& __loc)
      |     ^~~~~~~
/usr/include/c++/14/bits/locale_facets.h:2693:5: note:   candidate expects 2 arguments, 1 provided
In file included from /usr/include/c++/14/cctype:42,
                 from /usr/include/c++/14/bits/localefwd.h:42,
                 from /usr/include/c++/14/ios:43:
/usr/include/ctype.h:122:12: note: candidate: 'int tolower(int)'
  122 | extern int tolower (int __c) __THROW;
      |            ^~~~~~~
/usr/include/ctype.h:122:25: note:   no known conversion for argument 1 from 'std::string' {aka 'std::__cxx11::basic_string<char>'} to 'int'
  122 | extern int tolower (int __c) __THROW;
      |                     ~~~~^~~
Language: C++

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

int main(){
    while(1){
        
        
        int count[26] = {};
        
        char ch;
        while( scanf(%c%, &ch) != EOF){
            if( isalpha(ch)){
                count[ch - 'a'] += 1;
            }
        }
        
        for(int i=0; i<26; i++){
            printf("%c | %d\n", count - 'a', count[i]);
        }
        
    }
    return 0;
    
}


Compiler output:
a.cc: In function 'int main()':
a.cc:13:22: error: expected primary-expression before '%' token
   13 |         while( scanf(%c%, &ch) != EOF){
      |                      ^
a.cc:13:23: error: 'c' was not declared in this scope; did you mean 'ch'?
   13 |         while( scanf(%c%, &ch) != EOF){
      |                       ^
      |                       ch
a.cc:13:25: error: expected primary-expression before ',' token
   13 |         while( scanf(%c%, &ch) != EOF){
      |                         ^
Language: C++

#include<iostream>
#include<cstdio>
#include<cstring>

using namespace std;

int main() {
    int num[26] = {};
    char ch;
    while (cin >> ch) {
        if (islower(ch)) num[ch-'a']+= 1;
        else if num[ch-'A']+= 1;
    }
    for (int i = 0; i < 26; i++) {
        printf("%c : %d\n", i+'a', num[1]);
    }
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:12:17: error: expected '(' before 'num'
   12 |         else if num[ch-'A']+= 1;
      |                 ^~~
      |                 (
Language: C++

#include<iostream>
int main () {
    
    count[25] = {};
    
    char ch;
    
    while (1) {
        
        if (ch == '\n') break;
        
        if (isalpha(ch)) {
            
            int num = ch - 'a';
            
            count[num] += 1;
            
        }
        
    }
    
    for (int i = 0; i < 26; i ++) {
        
        char alpha = i + 'a';
        
        cout << alpha << ' : ' << count[i] << endl;
        
    }
    
    return 0;
    
}


Compiler output:
a.cc:26:26: warning: multi-character character constant [-Wmultichar]
   26 |         cout << alpha << ' : ' << count[i] << endl;
      |                          ^~~~~
a.cc: In function 'int main()':
a.cc:4:5: error: 'count' was not declared in this scope
    4 |     count[25] = {};
      |     ^~~~~
a.cc:26:9: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   26 |         cout << alpha << ' : ' << count[i] << endl;
      |         ^~~~
      |         std::cout
In file included from a.cc:1:
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
a.cc:26:47: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
   26 |         cout << alpha << ' : ' << count[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 () {
    
    count[25] = {0};
    
    char ch;
    
    while (1) {
        
        if (ch == '\n') break;
        
        if (isalpha(ch)) {
            
            int num = ch - 'a';
            
            count[num] += 1;
            
        }
        
    }
    
    for (int i = 0; i < 26; i ++) {
        
        char alpha = i + 'a';
        
        cout << alpha << ' : ' << count[i] << endl;
        
    }
    
    return 0;
    
}


Compiler output:
a.cc:26:26: warning: multi-character character constant [-Wmultichar]
   26 |         cout << alpha << ' : ' << count[i] << endl;
      |                          ^~~~~
a.cc: In function 'int main()':
a.cc:4:5: error: 'count' was not declared in this scope
    4 |     count[25] = {0};
      |     ^~~~~
a.cc:26:9: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   26 |         cout << alpha << ' : ' << count[i] << endl;
      |         ^~~~
      |         std::cout
In file included from a.cc:1:
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
a.cc:26:47: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
   26 |         cout << alpha << ' : ' << count[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 () {
    
    int count[25] = {0};
    
    char ch;
    
    while (1) {
        
        if (ch == '\n') break;
        
        if (isalpha(ch)) {
            
            int num = ch - 'a';
            
            count[num] += 1;
            
        }
        
    }
    
    for (int i = 0; i < 26; i ++) {
        
        char alpha = i + 'a';
        
        cout << alpha << ' : ' << count[i] << endl;
        
    }
    
    return 0;
    
}


Compiler output:
a.cc:26:26: warning: multi-character character constant [-Wmultichar]
   26 |         cout << alpha << ' : ' << count[i] << endl;
      |                          ^~~~~
a.cc: In function 'int main()':
a.cc:26:9: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   26 |         cout << alpha << ' : ' << count[i] << endl;
      |         ^~~~
      |         std::cout
In file included from a.cc:1:
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
a.cc:26:47: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
   26 |         cout << alpha << ' : ' << count[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>
using namespace std;
int main() {
    char ch;
    int counter[26] = [];
    while (cin >> ch) {
        cin >> ch;
        if (isalpha(ch)) {
            int num = ch - 'a';
            counter[num]++;
        }
    }
    for (int i=0;i<26;i++) {
        cout << i + 'a' << " : " << counter[i] << endl;
    }
    return 0;
}


Compiler output:
a.cc: In lambda function:
a.cc:5:25: error: expected '{' before ';' token
    5 |     int counter[26] = [];
      |                         ^
a.cc: In function 'int main()':
a.cc:5:23: error: array must be initialized with a brace-enclosed initializer
    5 |     int counter[26] = [];
      |                       ^~
Language: C++

#include<cstdio>
#include<cctype>
using namespace std;
int main(){
    char x;
    int t=0;
    for(char s='a';s<26;s++){
        for(int i=0;i<1000;i++){
            scanf("%c",&x);
            if(x==".") break;
            else if(s==x) t+=1;
        }
        print("%c : %d",s,t);
    }
}


Compiler output:
a.cc: In function 'int main()':
a.cc:10:17: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   10 |             if(x==".") break;
      |                ~^~~~~
a.cc:13:9: error: 'print' was not declared in this scope; did you mean 'printf'?
   13 |         print("%c : %d",s,t);
      |         ^~~~~
      |         printf
Language: C++

#include<cstdio>
#include<cctype>
using namespace std;
int main(){
    char x;
    int t=0;
    for(char s='a';s<26;s++){
        for(int i=0;i<1000;i++){
            scanf("%c",&x);
            if(x==".") break;
            else if(s==x) t+=1;
        }
        printf("%c : %d",s,t);
    }
}


Compiler output:
a.cc: In function 'int main()':
a.cc:10:17: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   10 |             if(x==".") break;
      |                ~^~~~~
Language: C++

int main(int argc, const char * argv[]) {
    char ch;
    int num;
    int sum[26] = {0};
    int i;

    while ( (ch = getchar()) != EOF){
        //どの文字に当たるかチェック
        if (ch>='a' && ch<='z') {//アルファベットかどうか判定
            num = ch - 'a';
            sum[num] ++;
            //printf("%c : %d\n", ch, sum[ch-'a']);
        }else if (ch>='A' && ch<='Z'){
            num = ch - 'A';
            sum[num] ++;
        }
    }

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

    return 0;
}


Compiler output:
a.cc: In function 'int main(int, const char**)':
a.cc:7:19: error: 'getchar' was not declared in this scope
    7 |     while ( (ch = getchar()) != EOF){
      |                   ^~~~~~~
a.cc:1:1: note: 'getchar' is defined in header '<cstdio>'; this is probably fixable by adding '#include <cstdio>'
  +++ |+#include <cstdio>
    1 | int main(int argc, const char * argv[]) {
a.cc:7:33: error: 'EOF' was not declared in this scope
    7 |     while ( (ch = getchar()) != EOF){
      |                                 ^~~
a.cc:7:33: note: 'EOF' is defined in header '<cstdio>'; this is probably fixable by adding '#include <cstdio>'
a.cc:20:9: error: 'printf' was not declared in this scope
   20 |         printf("%c : %d\n", i+'a', sum[i]);
      |         ^~~~~~
a.cc:20:9: note: 'printf' is defined in header '<cstdio>'; this is probably fixable by adding '#include <cstdio>'
Language: C++

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


Compiler output:
a.cc: In function 'int main()':
a.cc:9:33: error: expected ';' before '}' token
    9 |                 ch = tolower(ch)
      |                                 ^
      |                                 ;
   10 |             }
      |             ~
Language: C++

#include<iostream>
#include<stdio.h>
using namespace std;
int main(){
    char ch;
    int num;
    int counter[26];
    
    while(cin >> ch){
        int num = ch - 'a';
        counter[num]++; 
    }
    
    for(int i = 0; i < 26; i++){
        int ch = i + 'a';
        
        cout << ch << " " << : << counter[i] << endl;
    }
}


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

#include <iostream>
#include <stdio.h>
using namespace std;
int main(){
    int count[26]={};
    char ch
    while(scanf("%c", &ch) != EOF){
        scanf("%c", &ch);
        int num = ch - 'a';  
        count[num]++; 
    }
    for (int i=0;i<26;i++){
        cout<<"a+'i'"<<":"<<a[i]<<endl;
    }
    return;0
}


Compiler output:
a.cc: In function 'int main()':
a.cc:7:5: error: expected initializer before 'while'
    7 |     while(scanf("%c", &ch) != EOF){
      |     ^~~~~
a.cc:13:29: error: 'a' was not declared in this scope
   13 |         cout<<"a+'i'"<<":"<<a[i]<<endl;
      |                             ^
a.cc:15:5: error: return-statement with no value, in function returning 'int' [-fpermissive]
   15 |     return;0
      |     ^~~~~~
a.cc:15:13: error: expected ';' before '}' token
   15 |     return;0
      |             ^
      |             ;
   16 | }
      | ~
Language: C++

# include<iostream>
using namespace std;
int main() {
    char ch;
    int counter[26] = {};
    while (cin >> ch) {
        if (isalpha(ch)) {
            if (isupper(ch)) {
                ch = tolower(ch);
            }
            int num = ch - 'a';
            counter[num]++;
        }
    }
    for (int i=‘a’ – ‘a’;i<‘z' – ‘a’;i++) {
        cout << i + 'a' << " : " << counter[i] << endl;
    }
    return 0;
}


Compiler output:
a.cc:15:16: error: extended character ‘ is not valid in an identifier
   15 |     for (int i=‘a’ – ‘a’;i<‘z' – ‘a’;i++) {
      |                ^
a.cc:15:16: error: extended character ’ is not valid in an identifier
a.cc:15:20: error: extended character – is not valid in an identifier
   15 |     for (int i=‘a’ – ‘a’;i<‘z' – ‘a’;i++) {
      |                    ^
a.cc:15:22: error: extended character ‘ is not valid in an identifier
   15 |     for (int i=‘a’ – ‘a’;i<‘z' – ‘a’;i++) {
      |                      ^
a.cc:15:22: error: extended character ’ is not valid in an identifier
a.cc:15:28: error: extended character ‘ is not valid in an identifier
   15 |     for (int i=‘a’ – ‘a’;i<‘z' – ‘a’;i++) {
      |                            ^
a.cc:15:30: warning: missing terminating ' character
   15 |     for (int i=‘a’ – ‘a’;i<‘z' – ‘a’;i++) {
      |                              ^
a.cc:15:30: error: missing terminating ' character
   15 |     for (int i=‘a’ – ‘a’;i<‘z' – ‘a’;i++) {
      |                              ^~~~~~~~~~~~~~
a.cc: In function 'int main()':
a.cc:15:16: error: '\U00002018a\U00002019' was not declared in this scope
   15 |     for (int i=‘a’ – ‘a’;i<‘z' – ‘a’;i++) {
      |                ^~~
a.cc:15:28: error: '\U00002018z' was not declared in this scope
   15 |     for (int i=‘a’ – ‘a’;i<‘z' – ‘a’;i++) {
      |                            ^~
a.cc:15:30: error: expected ';' before 'cout'
   15 |     for (int i=‘a’ – ‘a’;i<‘z' – ‘a’;i++) {
      |                              ^
      |                              ;
   16 |         cout << i + 'a' << " : " << counter[i] << endl;
      |         ~~~~                  
a.cc:16:55: error: expected ')' before ';' token
   16 |         cout << i + 'a' << " : " << counter[i] << endl;
      |                                                       ^
      |                                                       )
a.cc:15:9: note: to match this '('
   15 |     for (int i=‘a’ – ‘a’;i<‘z' – ‘a’;i++) {
      |         ^
a.cc: At global scope:
a.cc:18:5: error: expected unqualified-id before 'return'
   18 |     return 0;
      |     ^~~~~~
a.cc:19:1: error: expected declaration before '}' token
   19 | }
      | ^
Language: C++

#include<iostream>
#include<stdio.h>
using namespace std;
int main () {
    
    int c[25] = {0};
    
    char ch;
    
    while (1) {
        
        scanf("%c", &ch);
        
        if (ch == '\n') break;
        
        if (isalpha(ch)) {
            
            if (isupper(ch)) {
                
                int tolower(ch)
                
                int num = ch - 'A';
                
                c[num] += 1;
                
            } else {
                
                int num = ch - 'a';
            
                c[num] += 1;
                
            }
            
        }
        
    }
    
    for (int i = 0; i < 26; i ++) {
        
        char alpha = i + 'a';
        
        cout << alpha << ' ' << ':' << ' ' <<  c[i] << endl;
        
    }
    
    return 0;
    
}



Compiler output:
a.cc: In function 'int main()':
a.cc:22:17: error: expected ',' or ';' before 'int'
   22 |                 int num = ch - 'A';
      |                 ^~~
a.cc:24:19: error: 'num' was not declared in this scope; did you mean 'enum'?
   24 |                 c[num] += 1;
      |                   ^~~
      |                   enum
Language: C++

#include<iostream>
#include<stdio.h>
using namespace std;
int main () {
    
    int c[25] = {0};
    
    char ch;
    
    while (1) {
        
        scanf("%c", &ch);
        
        if (ch == '\n') break;
        
        if (isalpha(ch)) {
            
            if (isupper(ch)) {
                
                ch = int tolower(ch);
                
                int num = ch - 'a';
                
                c[num] += 1;
                
            } else {
                
                int num = ch - 'a';
            
                c[num] += 1;
                
            }
            
        }
        
    }
    
    for (int i = 0; i < 26; i ++) {
        
        char alpha = i + 'a';
        
        cout << alpha << ' ' << ':' << ' ' <<  c[i] << endl;
        
    }
    
    return 0;
    
}



Compiler output:
a.cc: In function 'int main()':
a.cc:20:22: error: expected primary-expression before 'int'
   20 |                 ch = int tolower(ch);
      |                      ^~~
Language: C++

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

int main(){
    
    char ch;
    int counter[26] = {};
    int num;
    int x;
    while ( cin >> ch){
        if ( 97 <= ch && ch <= 122 ){
            num = ch - 'a';
            counter[num] += 1;
        }
        if ( 65 <= ch && ch <= 90 ){
            num = ch - 'A';
            counter[num] += 1;
        }
    }
    for ( int i = 0; i<26; i++){
        x = 97 + i;
        printf ( "%c : %d\n",x,counter[i]);
    }
    return 0;
}



Compiler output:
a.cc:1:1: error: stray '##' in program
    1 | ##include<iostream>
      | ^~
a.cc:1:3: error: 'include' does not name a type
    1 | ##include<iostream>
      |   ^~~~~~~
a.cc: In function 'int main()':
a.cc:12:13: error: 'cin' was not declared in this scope
   12 |     while ( cin >> ch){
      |             ^~~
Language: C++

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

int main(){
    int co[26]={};
    int i;
    char al[26]="abcdefghijklmnopqrstuvwxyz"
    char ch='a';
    while(cin>>ch){
        for(i=0;i<26;i++){
            if(ch==al[i]){
                co[i]+=1;
            }
        } 
    }
    for(j=0;j<26;j++){
        cout<<al[j]<<" : "<<co[j]<<endl;
    }
    return ;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:8:17: error: initializer-string for 'char [26]' is too long [-fpermissive]
    8 |     char al[26]="abcdefghijklmnopqrstuvwxyz"
      |                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
a.cc:9:5: error: expected ',' or ';' before 'char'
    9 |     char ch='a';
      |     ^~~~
a.cc:10:16: error: 'ch' was not declared in this scope; did you mean 'co'?
   10 |     while(cin>>ch){
      |                ^~
      |                co
a.cc:17:9: error: 'j' was not declared in this scope
   17 |     for(j=0;j<26;j++){
      |         ^
a.cc:20:5: error: return-statement with no value, in function returning 'int' [-fpermissive]
   20 |     return ;
      |     ^~~~~~
Language: C++

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

int main(){
    int co[26]={};
    int i,j;
    char al[26]="abcdefghijklmnopqrstuvwxyz"
    char ch='a';
    while(cin>>ch){
        for(i=0;i<26;i++){
            if(ch==al[i]){
                co[i]+=1;
            }
        } 
    }
    for(j=0;j<26;j++){
        cout<<al[j]<<" : "<<co[j]<<endl;
    }
    return ;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:8:17: error: initializer-string for 'char [26]' is too long [-fpermissive]
    8 |     char al[26]="abcdefghijklmnopqrstuvwxyz"
      |                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
a.cc:9:5: error: expected ',' or ';' before 'char'
    9 |     char ch='a';
      |     ^~~~
a.cc:10:16: error: 'ch' was not declared in this scope; did you mean 'co'?
   10 |     while(cin>>ch){
      |                ^~
      |                co
a.cc:20:5: error: return-statement with no value, in function returning 'int' [-fpermissive]
   20 |     return ;
      |     ^~~~~~
Language: C++

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

int main(){
    int co[26]={};
    int i,j;
    char al[26]="abcdefghijklmnopqrstuvwxyz"
    char ch;
    while(cin>>ch){
        for(i=0;i<26;i++){
            if(ch==al[i]){
                co[i]+=1;
            }
        } 
    }
    for(j=0;j<26;j++){
        cout<<al[j]<<" : "<<co[j]<<endl;
    }
    return ;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:8:17: error: initializer-string for 'char [26]' is too long [-fpermissive]
    8 |     char al[26]="abcdefghijklmnopqrstuvwxyz"
      |                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
a.cc:9:5: error: expected ',' or ';' before 'char'
    9 |     char ch;
      |     ^~~~
a.cc:10:16: error: 'ch' was not declared in this scope; did you mean 'co'?
   10 |     while(cin>>ch){
      |                ^~
      |                co
a.cc:20:5: error: return-statement with no value, in function returning 'int' [-fpermissive]
   20 |     return ;
      |     ^~~~~~
Language: C++

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

int main(){
    int co[26]={};
    int i,j;
    char al[40]="abcdefghijklmnopqrstuvwxyz"
    char ch;
    while(cin>>ch){
        for(i=0;i<26;i++){
            if(ch==al[i]){
                co[i]+=1;
            }
        } 
    }
    for(j=0;j<26;j++){
        cout<<al[j]<<" : "<<co[j]<<endl;
    }
    return ;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:9:5: error: expected ',' or ';' before 'char'
    9 |     char ch;
      |     ^~~~
a.cc:10:16: error: 'ch' was not declared in this scope; did you mean 'co'?
   10 |     while(cin>>ch){
      |                ^~
      |                co
a.cc:20:5: error: return-statement with no value, in function returning 'int' [-fpermissive]
   20 |     return ;
      |     ^~~~~~
Language: C++

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

int main(){
    int co[26]={};
    int i,j;
    char al[40]="abcdefghijklmnopqrstuvwxyz"
    char ch;
    while(scanf("%c", &ch) != EOF ){
        for(i=0;i<26;i++){
            if(ch==al[i]){
                co[i]+=1;
            }
        } 
    }
    for(j=0;j<26;j++){
        cout<<al[j]<<" : "<<co[j]<<endl;
    }
    return ;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:9:5: error: expected ',' or ';' before 'char'
    9 |     char ch;
      |     ^~~~
a.cc:10:24: error: 'ch' was not declared in this scope; did you mean 'co'?
   10 |     while(scanf("%c", &ch) != EOF ){
      |                        ^~
      |                        co
a.cc:20:5: error: return-statement with no value, in function returning 'int' [-fpermissive]
   20 |     return ;
      |     ^~~~~~