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

int main(int argc, const char * argv[])
{
    char w[1000] ={0};
    char t[1000] ={0};
    int count=0;
    int i=0;

    scanf("%s",w);

    do {
        scanf("%s",t);
        for(i=0; i<=MAX; i++){
            if(strcmp(t,"END_OF_TEXT") == 0){
                break;
            }
            if(t[i] >= 65 && t[i] <= 90){
                t[i] = t[i] + 32; //小文字化
            }
        }
        if(strcmp(t,"END_OF_TEXT") == 0){
            break;
        }
        if(strcmp(w,t) == 0){
            count++;
        }
        i++;
    } while (strcmp(t,"END_OF_TEXT") != 0);
    printf("%d",count);
    return 0;
}

Compiler output:
main.c: In function 'main':
main.c:8:5: error: implicit declaration of function 'scanf' [-Wimplicit-function-declaration]
    8 |     scanf("%s",w);
      |     ^~~~~
main.c:1:1: note: include '<stdio.h>' or provide a declaration of 'scanf'
  +++ |+#include <stdio.h>
    1 | int main(int argc, const char * argv[])
main.c:8:5: warning: incompatible implicit declaration of built-in function 'scanf' [-Wbuiltin-declaration-mismatch]
    8 |     scanf("%s",w);
      |     ^~~~~
main.c:8:5: note: include '<stdio.h>' or provide a declaration of 'scanf'
main.c:12:21: error: 'MAX' undeclared (first use in this function)
   12 |         for(i=0; i<=MAX; i++){
      |                     ^~~
main.c:12:21: note: each undeclared identifier is reported only once for each function it appears in
main.c:13:16: error: implicit declaration of function 'strcmp' [-Wimplicit-function-declaration]
   13 |             if(strcmp(t,"END_OF_TEXT") == 0){
      |                ^~~~~~
main.c:1:1: note: include '<string.h>' or provide a declaration of 'strcmp'
  +++ |+#include <string.h>
    1 | int main(int argc, const char * argv[])
main.c:28:5: error: implicit declaration of function 'printf' [-Wimplicit-function-declaration]
   28 |     printf("%d",count);
      |     ^~~~~~
main.c:28:5: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:28:5: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch]
main.c:28:5: note: include '<stdio.h>' or provide a declaration of 'printf'
Language: C

int main()
{
    char w[1000] ={0};
    char t[1000] ={0};
    int count=0;
    int i=0;

    scanf("%s",w);

    do {
        scanf("%s",t);
        for(i=0; i<=MAX; i++){
            if(strcmp(t,"END_OF_TEXT") == 0){
                break;
            }
            if(t[i] >= 65 && t[i] <= 90){
                t[i] = t[i] + 32; //小文字化
            }
        }
        if(strcmp(t,"END_OF_TEXT") == 0){
            break;
        }
        if(strcmp(w,t) == 0){
            count++;
        }
        i++;
    } while (strcmp(t,"END_OF_TEXT") != 0);
    printf("%d",count);
    return 0;
}

Compiler output:
main.c: In function 'main':
main.c:8:5: error: implicit declaration of function 'scanf' [-Wimplicit-function-declaration]
    8 |     scanf("%s",w);
      |     ^~~~~
main.c:1:1: note: include '<stdio.h>' or provide a declaration of 'scanf'
  +++ |+#include <stdio.h>
    1 | int main()
main.c:8:5: warning: incompatible implicit declaration of built-in function 'scanf' [-Wbuiltin-declaration-mismatch]
    8 |     scanf("%s",w);
      |     ^~~~~
main.c:8:5: note: include '<stdio.h>' or provide a declaration of 'scanf'
main.c:12:21: error: 'MAX' undeclared (first use in this function)
   12 |         for(i=0; i<=MAX; i++){
      |                     ^~~
main.c:12:21: note: each undeclared identifier is reported only once for each function it appears in
main.c:13:16: error: implicit declaration of function 'strcmp' [-Wimplicit-function-declaration]
   13 |             if(strcmp(t,"END_OF_TEXT") == 0){
      |                ^~~~~~
main.c:1:1: note: include '<string.h>' or provide a declaration of 'strcmp'
  +++ |+#include <string.h>
    1 | int main()
main.c:28:5: error: implicit declaration of function 'printf' [-Wimplicit-function-declaration]
   28 |     printf("%d",count);
      |     ^~~~~~
main.c:28:5: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:28:5: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch]
main.c:28:5: note: include '<stdio.h>' or provide a declaration of 'printf'
Language: C

int main()
{
    char w[1000] ={0};
    char t[1000] ={0};
    int count=0;
    int i=0;

    scanf("%s",w);

    do {
        scanf("%s",t);
        for(i=0; i<=MAX; i++){
            if(strcmp(t,"END_OF_TEXT") == 0){
                break;
            }
            if(t[i] >= 65 && t[i] <= 90){
                t[i] = t[i] + 32;
            }
        }
        if(strcmp(t,"END_OF_TEXT") == 0){
            break;
        }
        if(strcmp(w,t) == 0){
            count++;
        }
        i++;
    } while (strcmp(t,"END_OF_TEXT") != 0);
    printf("%d",count);
    return 0;
}

Compiler output:
main.c: In function 'main':
main.c:8:5: error: implicit declaration of function 'scanf' [-Wimplicit-function-declaration]
    8 |     scanf("%s",w);
      |     ^~~~~
main.c:1:1: note: include '<stdio.h>' or provide a declaration of 'scanf'
  +++ |+#include <stdio.h>
    1 | int main()
main.c:8:5: warning: incompatible implicit declaration of built-in function 'scanf' [-Wbuiltin-declaration-mismatch]
    8 |     scanf("%s",w);
      |     ^~~~~
main.c:8:5: note: include '<stdio.h>' or provide a declaration of 'scanf'
main.c:12:21: error: 'MAX' undeclared (first use in this function)
   12 |         for(i=0; i<=MAX; i++){
      |                     ^~~
main.c:12:21: note: each undeclared identifier is reported only once for each function it appears in
main.c:13:16: error: implicit declaration of function 'strcmp' [-Wimplicit-function-declaration]
   13 |             if(strcmp(t,"END_OF_TEXT") == 0){
      |                ^~~~~~
main.c:1:1: note: include '<string.h>' or provide a declaration of 'strcmp'
  +++ |+#include <string.h>
    1 | int main()
main.c:28:5: error: implicit declaration of function 'printf' [-Wimplicit-function-declaration]
   28 |     printf("%d",count);
      |     ^~~~~~
main.c:28:5: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:28:5: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch]
main.c:28:5: note: include '<stdio.h>' or provide a declaration of 'printf'
Language: C

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

int main()
{
	char word[11];
	char text[1001];
	int count=0
	int i;
	
	scanf("%s",word);
	
	while(1){
		scanf("%s",text);
		if(strcmp("END_OF_TEXT",text)==0)
			break;
		for(i=0;i<1001;i++)
			text[i] == tolower(text[i]);
		if(strcmp(text[i],word)==0)
			count++;
	}

	printf("%d\n",count);
	
	return 0;
}

Compiler output:
main.c: In function 'main':
main.c:9:9: error: expected ',' or ';' before 'int'
    9 |         int i;
      |         ^~~
main.c:17:21: error: 'i' undeclared (first use in this function)
   17 |                 for(i=0;i<1001;i++)
      |                     ^
main.c:17:21: note: each undeclared identifier is reported only once for each function it appears in
main.c:18:36: error: implicit declaration of function 'tolower' [-Wimplicit-function-declaration]
   18 |                         text[i] == tolower(text[i]);
      |                                    ^~~~~~~
main.c:3:1: note: include '<ctype.h>' or provide a declaration of 'tolower'
    2 | #include <string.h>
  +++ |+#include <ctype.h>
    3 |
Language: C

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

int main(){
  int a=0,i;
  char tango[11],bun[1001];
  scanf("%s",tango);
  while(1){
    scanf("%s",bun);
    if(strcmp(bun,"END_OF_TEXT") == 0) break;
    else if(bun <= 'Z' && bun >= 'A'){
      tango += 32;
    if(strcmp(tango,bun) == 0){
      a++;
    }
  }
  printf("%d\n",a);
  return 0;
}

Compiler output:
main.c: In function 'main':
main.c:11:17: warning: comparison between pointer and integer
   11 |     else if(bun <= 'Z' && bun >= 'A'){
      |                 ^~
main.c:11:31: warning: comparison between pointer and integer
   11 |     else if(bun <= 'Z' && bun >= 'A'){
      |                               ^~
main.c:12:13: error: assignment to expression with array type
   12 |       tango += 32;
      |             ^~
main.c:19:1: error: expected declaration or statement at end of input
   19 | }
      | ^
Language: C

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

int main(){
  int a=0,i,b,c;
  char tango[11],bun[1001];
  scanf("%s",tango);
  while(tango[i] != '\0'){
    if(tango[i] >= 'A' && tango[i] <= 'Z'){
      c = 'a' - 'A';
      tango[i] += c;
    }
  }
  while(1){
    scanf("%s",bun);
    if(strcmp(bun,"END_OF_TEXT") == 0) break;
    b=0;
    while(bun[b] != '\0'){
      if(bun[b] >= 'A' && bun[b] <= 'Z'){
	d = 'a' - 'A';
	bun[b] += d;
	b++;
      }
    }
    if(strcmp(tango,bun) == 0){
      a++;
    }
  }
  printf("%d\n",a);
  return 0;
}  

Compiler output:
main.c: In function 'main':
main.c:20:9: error: 'd' undeclared (first use in this function)
   20 |         d = 'a' - 'A';
      |         ^
main.c:20:9: note: each undeclared identifier is reported only once for each function it appears in
Language: C++

#include<cstdio>
#include<iostream>
#include<string>
using namespace std;
int main(){
char W;
char T;
int count=0;
cin>>W>>T;
while(T!='END_OF_TEXT'){
if(strcmp(W,T)==0)count++;
cin>>T;
}
cout<<count<<endl;
return 0;
}

Compiler output:
a.cc:10:10: warning: multi-character literal with 11 characters exceeds 'int' size of 4 bytes
   10 | while(T!='END_OF_TEXT'){
      |          ^~~~~~~~~~~~~
a.cc: In function 'int main()':
a.cc:11:4: error: 'strcmp' was not declared in this scope
   11 | if(strcmp(W,T)==0)count++;
      |    ^~~~~~
a.cc:3:1: note: 'strcmp' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
    2 | #include<iostream>
  +++ |+#include <cstring>
    3 | #include<string>
Language: C++

#include<cstdio>
#include<iostream>
#include<string>
#include<cctype>
using namespace std;
int main(){
string W,T;
int i;
int count=0;
cin>>W>>T;
for(i=0;i<strlen(W);i++)if(isupper(W[i]))W[i]=tolower(W[i]);
for(i=0;i<strlen(T);i++)if(isupper(T[i]))T[i]=tolower(T[i]);
while(strcmp(T,"END_OF_TEXT")!=0){
if(W==T)count++;
cin>>T;
for(i=0;i<strlen(T);i++)if(isupper(T[i]))T[i]=tolower(T[i]);
}
cout<<count<<endl;
return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:11:11: error: 'strlen' was not declared in this scope
   11 | for(i=0;i<strlen(W);i++)if(isupper(W[i]))W[i]=tolower(W[i]);
      |           ^~~~~~
a.cc:5:1: note: 'strlen' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
    4 | #include<cctype>
  +++ |+#include <cstring>
    5 | using namespace std;
a.cc:12:11: error: 'strlen' was not declared in this scope
   12 | for(i=0;i<strlen(T);i++)if(isupper(T[i]))T[i]=tolower(T[i]);
      |           ^~~~~~
a.cc:12:11: note: 'strlen' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
a.cc:13:7: error: 'strcmp' was not declared in this scope
   13 | while(strcmp(T,"END_OF_TEXT")!=0){
      |       ^~~~~~
a.cc:13:7: note: 'strcmp' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
a.cc:16:11: error: 'strlen' was not declared in this scope
   16 | for(i=0;i<strlen(T);i++)if(isupper(T[i]))T[i]=tolower(T[i]);
      |           ^~~~~~
a.cc:16:11: note: 'strlen' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
Language: C++

#include<cstdio>
#include<iostream>
#include<cstring>
#include<cctype>
using namespace std;
int main(){
string W,T;
int i;
int count=0;
cin>>W>>T;
for(i=0;i<strlen(W);i++)if(isupper(W[i]))W[i]=tolower(W[i]);
for(i=0;i<strlen(T);i++)if(isupper(T[i]))T[i]=tolower(T[i]);
while(T!="END_OF_TEXT"){
if(W==T)count++;
cin>>T;
for(i=0;i<strlen(T);i++)if(isupper(T[i]))T[i]=tolower(T[i]);
}
cout<<count<<endl;
return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:11:18: error: cannot convert 'std::string' {aka 'std::__cxx11::basic_string<char>'} to 'const char*'
   11 | for(i=0;i<strlen(W);i++)if(isupper(W[i]))W[i]=tolower(W[i]);
      |                  ^
      |                  |
      |                  std::string {aka std::__cxx11::basic_string<char>}
In file included from /usr/include/c++/14/cstring:43,
                 from a.cc:3:
/usr/include/string.h:407:35: note:   initializing argument 1 of 'size_t strlen(const char*)'
  407 | extern size_t strlen (const char *__s)
      |                       ~~~~~~~~~~~~^~~
a.cc:12:18: error: cannot convert 'std::string' {aka 'std::__cxx11::basic_string<char>'} to 'const char*'
   12 | for(i=0;i<strlen(T);i++)if(isupper(T[i]))T[i]=tolower(T[i]);
      |                  ^
      |                  |
      |                  std::string {aka std::__cxx11::basic_string<char>}
/usr/include/string.h:407:35: note:   initializing argument 1 of 'size_t strlen(const char*)'
  407 | extern size_t strlen (const char *__s)
      |                       ~~~~~~~~~~~~^~~
a.cc:16:18: error: cannot convert 'std::string' {aka 'std::__cxx11::basic_string<char>'} to 'const char*'
   16 | for(i=0;i<strlen(T);i++)if(isupper(T[i]))T[i]=tolower(T[i]);
      |                  ^
      |                  |
      |                  std::string {aka std::__cxx11::basic_string<char>}
/usr/include/string.h:407:35: note:   initializing argument 1 of 'size_t strlen(const char*)'
  407 | extern size_t strlen (const char *__s)
      |                       ~~~~~~~~~~~~^~~
Language: C++

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

int main(){
char W[10];
char T[1000];
int i;
int count=0;
cin>>W;
for(i=0;i<strlen(W);i++)W[i] = toupper(W[i]);
while(cin>>T,strcmp(T,"END_OF_TEXT")!=0){
	for(i=0;i<strlen(T);i++)T[i] = toupper(T[i]);
	if(strcmp(W,T)==0)count++;
}
cout<<count<<endl;
return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:13:11: error: 'strlen' was not declared in this scope
   13 | for(i=0;i<strlen(W);i++)W[i] = toupper(W[i]);
      |           ^~~~~~
a.cc:4:1: note: 'strlen' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
    3 | #include<cctype>
  +++ |+#include <cstring>
    4 | #include<string>
a.cc:14:14: error: 'strcmp' was not declared in this scope
   14 | while(cin>>T,strcmp(T,"END_OF_TEXT")!=0){
      |              ^~~~~~
a.cc:14:14: note: 'strcmp' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
a.cc:15:19: error: 'strlen' was not declared in this scope
   15 |         for(i=0;i<strlen(T);i++)T[i] = toupper(T[i]);
      |                   ^~~~~~
a.cc:15:19: note: 'strlen' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
Language: C++

#include <iostream>
#include <cstdio>

using namespace std;

int main()
{
	char W[32];
	char T[2048];
	int num = 0;
	cin >> W;
	while (cin >> T, strcmp(T, "END_OF_TEXT")){
		for (int i = 0; T[i] != '\0'; i++){
			if (strncmp(&T[i], W, strlen(W)) == 0){
				num++;
			}
		}
	}
	cout << num << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:12:26: error: 'strcmp' was not declared in this scope
   12 |         while (cin >> T, strcmp(T, "END_OF_TEXT")){
      |                          ^~~~~~
a.cc:3:1: note: 'strcmp' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
    2 | #include <cstdio>
  +++ |+#include <cstring>
    3 | 
a.cc:14:47: error: 'strlen' was not declared in this scope
   14 |                         if (strncmp(&T[i], W, strlen(W)) == 0){
      |                                               ^~~~~~
a.cc:14:47: note: 'strlen' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
a.cc:14:29: error: 'strncmp' was not declared in this scope
   14 |                         if (strncmp(&T[i], W, strlen(W)) == 0){
      |                             ^~~~~~~
a.cc:14:29: note: 'strncmp' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
Language: C++

#include <iostream>
#include <cstdio>

using namespace std;

int main()
{
	char W[32];
	char T[2048];
	int num = 0;
	scanf("%s", W);
	while (scanf("%s", T), strcmp(T, "END_OF_TEXT")){
		for (int i = 0; T[i] != '\0'; i++){
			if (strncmp(&T[i], W, strlen(W)) == 0){
				num++;
			}
		}
	}
	cout << num << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:12:32: error: 'strcmp' was not declared in this scope
   12 |         while (scanf("%s", T), strcmp(T, "END_OF_TEXT")){
      |                                ^~~~~~
a.cc:3:1: note: 'strcmp' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
    2 | #include <cstdio>
  +++ |+#include <cstring>
    3 | 
a.cc:14:47: error: 'strlen' was not declared in this scope
   14 |                         if (strncmp(&T[i], W, strlen(W)) == 0){
      |                                               ^~~~~~
a.cc:14:47: note: 'strlen' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
a.cc:14:29: error: 'strncmp' was not declared in this scope
   14 |                         if (strncmp(&T[i], W, strlen(W)) == 0){
      |                             ^~~~~~~
a.cc:14:29: note: 'strncmp' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
Language: C++

#include <iostream>
#include <cstdio>

using namespace std;

int main()
{
	char W[32];
	char T[2048];
	int num = 0;
	scanf("%s", W);
	while (fgets(T, 2048, stdin), strncmp(T, "END_OF_TEXT", 11)){
		for (int i = 0; T[i] != '\0'; i++){
			if (strncmp(&T[i], W, strlen(W)) == 0){
				num++;
			}
		}
	}
	cout << num << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:12:39: error: 'strncmp' was not declared in this scope
   12 |         while (fgets(T, 2048, stdin), strncmp(T, "END_OF_TEXT", 11)){
      |                                       ^~~~~~~
a.cc:3:1: note: 'strncmp' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
    2 | #include <cstdio>
  +++ |+#include <cstring>
    3 | 
a.cc:14:47: error: 'strlen' was not declared in this scope
   14 |                         if (strncmp(&T[i], W, strlen(W)) == 0){
      |                                               ^~~~~~
a.cc:14:47: note: 'strlen' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
Language: C++

#include<iostream>
#include<cstdlib>
#include<algorithm>
#include<string>
#include<cctype>
using namespace std;
int main()
{
  string w;
  int ans=0;
  cin>>w;
  transform(w.begin(),w.end(),w.begin(),::tolower);
  for(string tmp;cin>>tmp,tmp!="END_OF_TEXT";)
    {
      transform(tmp.begin(),tmp.end(),tmp.begin(),:tolower);
      if(w==tmp)
	ans++;
    }
  cout<<ans<<endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:15:51: error: expected primary-expression before ':' token
   15 |       transform(tmp.begin(),tmp.end(),tmp.begin(),:tolower);
      |                                                   ^
Language: C++

#include <iostream>
#include <string>

using namespace std;

int main(){
	string W,T;
	int count = 0;

	cin >> W ;
	for(int i = 0; i<w.size(); i++){
		w[i] = tolower(w[i]);
	}

	while(cin >> T,T != "END_OF_TEXT"){
		for(int i = 0; i<T.size(); i++){
			T[i] = tolower(T[i]);
		}
		
		if(W == T){
			count++;
		}
	}

	cout << count << endl;

}

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

#include<stdio.h>
int main(){
int i,j=0;
char w[11],t[1001];
scanf("%s",w);
for(i=0;i<strlen(w);i++){
if(w>='A'&&w<='Z')w[i]+='a'-'A';
}
while(1){
scanf("%s",t);
if(t=="END_OF_TEXT")break;
for(i=0;i<strlen(t);i++){
if(t>='A'&&t<='Z')t[i]+='a'-'A';
}
if(strcmp(w,t)==0)j++;
}
printf("%d\n",j);
return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:11: error: 'strlen' was not declared in this scope
    6 | for(i=0;i<strlen(w);i++){
      |           ^~~~~~
a.cc:2:1: note: 'strlen' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
    1 | #include<stdio.h>
  +++ |+#include <cstring>
    2 | int main(){
a.cc:7:5: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
    7 | if(w>='A'&&w<='Z')w[i]+='a'-'A';
      |    ~^~~~~
a.cc:7:13: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
    7 | if(w>='A'&&w<='Z')w[i]+='a'-'A';
      |            ~^~~~~
a.cc:12:11: error: 'strlen' was not declared in this scope
   12 | for(i=0;i<strlen(t);i++){
      |           ^~~~~~
a.cc:12:11: note: 'strlen' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
a.cc:13:5: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   13 | if(t>='A'&&t<='Z')t[i]+='a'-'A';
      |    ~^~~~~
a.cc:13:13: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   13 | if(t>='A'&&t<='Z')t[i]+='a'-'A';
      |            ~^~~~~
a.cc:15:4: error: 'strcmp' was not declared in this scope
   15 | if(strcmp(w,t)==0)j++;
      |    ^~~~~~
a.cc:15:4: note: 'strcmp' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
Language: C++

import java.util.Scanner;

class AMain {
    public static void main(String[] args){
        Scanner input = new Scanner(System.in);
        String w = input.next().toLowerCase();
        int cnt = 0;

        while (true){
            String t = input.next().toLowerCase().replaceAll("[\".,]", "");

            if (t.equals("end_of_text")) break;
            if (w.equals(t)) cnt++;
        }
        System.out.println(cnt);
    }
}

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:4:11: error: expected ':' before 'static'
    4 |     public static void main(String[] args){
      |           ^~~~~~~
      |           :
a.cc:4:29: error: 'String' has not been declared
    4 |     public static void main(String[] args){
      |                             ^~~~~~
a.cc:4:38: error: expected ',' or '...' before 'args'
    4 |     public static void main(String[] args){
      |                                      ^~~~
a.cc:17:2: error: expected ';' after class definition
   17 | }
      |  ^
      |  ;
a.cc: In static member function 'static void AMain::main(int*)':
a.cc:5:9: error: 'Scanner' was not declared in this scope
    5 |         Scanner input = new Scanner(System.in);
      |         ^~~~~~~
a.cc:6:9: error: 'String' was not declared in this scope
    6 |         String w = input.next().toLowerCase();
      |         ^~~~~~
a.cc:10:20: error: expected ';' before 't'
   10 |             String t = input.next().toLowerCase().replaceAll("[\".,]", "");
      |                    ^
a.cc:12:17: error: 't' was not declared in this scope
   12 |             if (t.equals("end_of_text")) break;
      |                 ^
a.cc:13:17: error: 'w' was not declared in this scope
   13 |             if (w.equals(t)) cnt++;
      |                 ^
a.cc:13:26: error: 't' was not declared in this scope
   13 |             if (w.equals(t)) cnt++;
      |                          ^
a.cc:15:9: error: 'System' was not declared in this scope
   15 |         System.out.println(cnt);
      |         ^~~~~~
Language: C++

import java.util.Scanner;

class Main {
    public static void main(String[] args){
        Scanner input = new Scanner(System.in);
        String w = input.next().toLowerCase();
        int cnt = 0;

        while (true){
            String t = input.next().toLowerCase().replaceAll("[\".,]", "");

            if (t.equals("end_of_text")) break;
            if (w.equals(t)) cnt++;
        }
        System.out.println(cnt);
    }
}

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:4:11: error: expected ':' before 'static'
    4 |     public static void main(String[] args){
      |           ^~~~~~~
      |           :
a.cc:4:29: error: 'String' has not been declared
    4 |     public static void main(String[] args){
      |                             ^~~~~~
a.cc:4:38: error: expected ',' or '...' before 'args'
    4 |     public static void main(String[] args){
      |                                      ^~~~
a.cc:17:2: error: expected ';' after class definition
   17 | }
      |  ^
      |  ;
a.cc: In static member function 'static void Main::main(int*)':
a.cc:5:9: error: 'Scanner' was not declared in this scope
    5 |         Scanner input = new Scanner(System.in);
      |         ^~~~~~~
a.cc:6:9: error: 'String' was not declared in this scope
    6 |         String w = input.next().toLowerCase();
      |         ^~~~~~
a.cc:10:20: error: expected ';' before 't'
   10 |             String t = input.next().toLowerCase().replaceAll("[\".,]", "");
      |                    ^
a.cc:12:17: error: 't' was not declared in this scope
   12 |             if (t.equals("end_of_text")) break;
      |                 ^
a.cc:13:17: error: 'w' was not declared in this scope
   13 |             if (w.equals(t)) cnt++;
      |                 ^
a.cc:13:26: error: 't' was not declared in this scope
   13 |             if (w.equals(t)) cnt++;
      |                          ^
a.cc:15:9: error: 'System' was not declared in this scope
   15 |         System.out.println(cnt);
      |         ^~~~~~
Language: C++

#include <iostream>
#include <bits/stdc++.h>
#include <string>
#include <ctype.h>
#include <algorithm>

#define REP(i, n) for(int i=0;i<(int)(n);i++)
#define ALL(x) (x).begin(),(x).end()
const int INF = 1e9;

using namespace std;

int main() {
    string w;
    string in;
    int i;

    cin >> w;
    transform(w.begin(), w.end(), w.begin(), ::tolower);
    while(1){
        cin >> in;
        if(in == "END_OF_TEXT")
            break;
        transform(in.begin(), in.end(), in.begin(), ::tolower);C
        if(in == w)
            i++;
    }
    cout << i << endl;

    return 0;
}

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

#include <iostream>
#include <bits/stdc++.h>
#include <string>
#include <ctype.h>
#include <algorithm>

#define REP(i, n) for(int i=0;i<(int)(n);i++)
#define ALL(x) (x).begin(),(x).end()
const int INF = 1e9;

using namespace std;

int main() {
    string w;
    string in;
    int i;
    cin >> w;
    transform(w.begin(), w.end(), w.begin(), ::tolower);
    while(1){
        cin >> in;
        if(in == "END_OF_TEXT")
            break;
        transform(in.begin(), in.end(), in.begin(), ::tolower);
        int period = in.find('.', 0);
        int excramation = in.find('!', 0);
        int comma = in.find(',', 0);
        int mark = in.find('\"', 0);
        int question = in.find("?", 0)
        if (period != string::npos)
            in.erase(period);
        if (excramation != string::npos)
            in.erase(excramation);
        if (comma != string::npos)
            in.erase(comma);
        if (question != string::npos)
            in.erase(question);
        while (mark != string::npos) {
            in.erase(mark, 1);
            mark = in.find('\"', 0);
        }


//        cout << w << " " << in << endl;
        if(in == w)
            i++;
    }
    cout << i << endl;

    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:29:9: error: expected ',' or ';' before 'if'
   29 |         if (period != string::npos)
      |         ^~
Language: C++

import string

w = input()
w.upper()

cnt = 0

while True:
    S = input().split()
    for s in S:
        s.upper()

        i = 0
        while i < len(s):
            if s not in string.digits:
                s.erase(i)
                i -= 1
            i += 1

        if (s == w):
            cnt += 1
    if S[-1] == 'END_OF_TEXT':
        break

print(cnt)

Compiler output:
a.cc:22:17: warning: multi-character literal with 11 characters exceeds 'int' size of 4 bytes
   22 |     if S[-1] == 'END_OF_TEXT':
      |                 ^~~~~~~~~~~~~
a.cc:1:1: error: 'import' does not name a type
    1 | import string
      | ^~~~~~
a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts'
Language: C++

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

int main(){
	string W,T;
	int ans = 0;

	cin>>W;
	while(cin>>T,T != "END_OF_TEXT"){
		if(T == W){
			ans++
		}
	}
	cout<<ans<<endl;

	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:11:30: error: expected ';' before '}' token
   11 |                         ans++
      |                              ^
      |                              ;
   12 |                 }
      |                 ~
Language: C++

#include<iostream>
#include<cstdio>
#include<algorithm>
#include<string>
using namespace std;
    int main(){
    string a,b;
    int cou=0;
    cin>>a;
    for(iny i=0;i<a.size();i++)a[i]=tolower(a[i]);
    for(;;){
        cin>>b;
        for(int i=0;i<b.size();i++){
            b[i]=tolower(b[i]);
        }
        if(a==b)cou++;
        if(b=="end_of_text")break;
    }
    cout<<cou<<endl;
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:9: error: 'iny' was not declared in this scope; did you mean 'int'?
   10 |     for(iny i=0;i<a.size();i++)a[i]=tolower(a[i]);
      |         ^~~
      |         int
a.cc:10:17: error: 'i' was not declared in this scope
   10 |     for(iny i=0;i<a.size();i++)a[i]=tolower(a[i]);
      |                 ^
Language: C++

key = gets.chomp
key
cnt = 0
while t = gets
  t = t.chomp.split
  break if t[0] == "END_OF_TEXT"
  for i in 0...t.length
    cnt += 1 if key.downcase == t[i].downcase
  end
end
puts cnt

Compiler output:
a.cc:7:12: error: too many decimal points in number
    7 |   for i in 0...t.length
      |            ^~~~~~~~~~~~
a.cc:1:1: error: 'key' does not name a type
    1 | key = gets.chomp
      | ^~~
Language: C++

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

int main() {
	string keep;
	string str;
	int count = 0;

	cin >> keep;
	while(cin >> str) {
		if(str == "END_OF_TEXT") {
			break;
		}

		transform(str.begin(), str.end(), str.begin(), ::tolower);
		if(str == keep) {
			count++;
		}
	}
	cout << count << endl;

	return 0;
}

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

#include <iostream>
#include <ctype>

using namespace std;

int main()
{
	string str, tmp;
	int cnt = 0;
	
	cin >> str;
	for (int i = 0; i < str.size(); i++)	str[i] = tolower(str[i]);
	while (cin >> tmp, tmp != "END_OF_TEXT"){
		for (int i = 0; i < tmp.size(); i++)	tmp[i] = tolower(tmp[i]);
		if (tmp == str)	cnt++;
	}
	cout << cnt << endl;
	return (0);
}

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

str  = raw_input()
lines = []
while True:
    Sentence = raw_input()
    if Sentence == 'END_OF_TEXT':break
    lines += Sentence.lower().split()
print lines.count(str)

Compiler output:
a.cc:5:20: warning: multi-character literal with 11 characters exceeds 'int' size of 4 bytes
    5 |     if Sentence == 'END_OF_TEXT':break
      |                    ^~~~~~~~~~~~~
a.cc:1:1: error: 'str' does not name a type
    1 | str  = raw_input()
      | ^~~
Language: C++

word = gets.chomp.upcase
cnt = 0
catch(:loop) do
	while true
		str = gets.upcase.delete(".").split(" ")
		str.each do |s|
			if s == word then cnt += 1
			end
			throw :loop if str[i] == "END_OF_TEXT"
		end
	end
end
puts "#{cnt}"

Compiler output:
a.cc:1:1: error: 'word' does not name a type
    1 | word = gets.chomp.upcase
      | ^~~~
Language: C++

word = gets.chomp.upcase
cnt = 0
catch(:loop) do
	while true
		str = gets.upcase.delete(".").split(" ")
		str.each do |s|
			if s == word then cnt += 1
			end
			throw :loop if s == "END_OF_TEXT"
		end
	end
end
puts "#{cnt}"

Compiler output:
a.cc:1:1: error: 'word' does not name a type
    1 | word = gets.chomp.upcase
      | ^~~~
Language: C++

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

int main(void){

char tan[10000];
char tex[10000];
char end[20]="END_OF_TEXT";
int cont=0;
int now;

gets(tan);

while(1){
now=0;
gets(tex);

for(int i=0;;i++){
if(end[i]==0){
goto A;
}
if(end[i]!=tex[i]){
break;
}
}

int ren=0;

while(1){
B:
if(tex[now]==0){
break;
}
if(tan[ren]==0 && tex[now]==' '){
cont++;
ren=0;
continue;
}
if(tex[now]!=tan[ren]){
while(1){
if(tex[now]==' '){
ren=0;
goto B;
}
}
now++;ren++;

}
}


}

A:
printf("%d\n",cont);

return 0;
}

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

import java.util.*;

public class Main {
  public static void main(String[] args) {
    Scanner in = new Scanner(System.in);
    String t = in.next();
    int count = 0;
    for(String a = in.next(); !"END_OF_TEXT".equals(a); a = in.next()) {
      if(t.equals(a)) count++;
    }
    System.out.printf("%d\n", count);
  }
}

Compiler output:
a.cc:1:1: error: 'import' does not name a type
    1 | import java.util.*;
      | ^~~~~~
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++

// AOJ 10022
#include <stdio.h>
#include <stdlib.h>
#include <string.h>

int main(void)
{
    char buf[1024], word[64];
    fgets(buf, sizeof(buf), stdin);
    sscanf(buf, "%s", word);

    int count = 0;

    while(1){
        char *p, *cont;
        fgets(buf, sizeof(buf), stdin);
        while(buf[strlen(buf)-1] == '\r' || buf[strlen(buf)-1] == '\n'){
            buf[strlen(buf)-1] = 0;
        }
        if(strcmp(buf, "END_OF_TEXT") == 0) break;

        p = strtok_s(buf, " ", &cont);
        while(p != NULL){
            //printf("[%s]", p);
            if(stricmp(p, word) == 0){
                count++;
            }
            p = strtok_s(NULL, " ", &cont);
        }
    }
    printf("%d\n", count);

    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:22:13: error: 'strtok_s' was not declared in this scope; did you mean 'strtok_r'?
   22 |         p = strtok_s(buf, " ", &cont);
      |             ^~~~~~~~
      |             strtok_r
a.cc:25:16: error: 'stricmp' was not declared in this scope; did you mean 'strncmp'?
   25 |             if(stricmp(p, word) == 0){
      |                ^~~~~~~
      |                strncmp
Language: C++

// AOJ 10022
#include <stdio.h>
#include <stdlib.h>
#include <string.h>

#ifdef _MSC_VER
#define strcasecmp stricmp
#define strtok_r strtok_s
#endif

int main(void)
{
    char buf[1024], word[64];
    fgets(buf, sizeof(buf), stdin);
    sscanf(buf, "%s", word);

    int count = 0;

    while(1){
        char *p, *cont;
        fgets(buf, sizeof(buf), stdin);
        while(buf[strlen(buf)-1] == '\r' || buf[strlen(buf)-1] == '\n'){
            buf[strlen(buf)-1] = 0;
        }
        if(strcmp(buf, "END_OF_TEXT") == 0) break;

        p = strtok_s(buf, " ", &cont);
        while(p != NULL){
            //printf("[%s]", p);
            if(strcasecmp(p, word) == 0){
                count++;
            }
            p = strtok_s(NULL, " ", &cont);
        }
    }
    printf("%d\n", count);

    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:27:13: error: 'strtok_s' was not declared in this scope; did you mean 'strtok_r'?
   27 |         p = strtok_s(buf, " ", &cont);
      |             ^~~~~~~~
      |             strtok_r
Language: C++

#include<iostream>
using namespace std;

int main(){
int s,t;
cin >> s;
for(int i=0;i<s.size();i++)
if('A'<=s[i] && s[i]<='Z')s[i] += 32;
int ans = 0;
while(cin >> t, t!="END_OF_TEXT"){
if(s.size()!=t.size())continue;
bool f = true;
for(int i=0;i<s.size();i++){
if('A'<=t[i] && t[i]<='Z')t[i] += 32;
if(t[i]!=s[i]){
f = false;
break;
}
}
if(f)ans++;
}
cout << ans << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:17: error: request for member 'size' in 's', which is of non-class type 'int'
    7 | for(int i=0;i<s.size();i++)
      |                 ^~~~
a.cc:8:10: error: invalid types 'int[int]' for array subscript
    8 | if('A'<=s[i] && s[i]<='Z')s[i] += 32;
      |          ^
a.cc:8:18: error: invalid types 'int[int]' for array subscript
    8 | if('A'<=s[i] && s[i]<='Z')s[i] += 32;
      |                  ^
a.cc:8:28: error: invalid types 'int[int]' for array subscript
    8 | if('A'<=s[i] && s[i]<='Z')s[i] += 32;
      |                            ^
a.cc:10:18: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   10 | while(cin >> t, t!="END_OF_TEXT"){
      |                 ~^~~~~~~~~~~~~~~
a.cc:11:6: error: request for member 'size' in 's', which is of non-class type 'int'
   11 | if(s.size()!=t.size())continue;
      |      ^~~~
a.cc:11:16: error: request for member 'size' in 't', which is of non-class type 'int'
   11 | if(s.size()!=t.size())continue;
      |                ^~~~
a.cc:13:17: error: request for member 'size' in 's', which is of non-class type 'int'
   13 | for(int i=0;i<s.size();i++){
      |                 ^~~~
a.cc:14:10: error: invalid types 'int[int]' for array subscript
   14 | if('A'<=t[i] && t[i]<='Z')t[i] += 32;
      |          ^
a.cc:14:18: error: invalid types 'int[int]' for array subscript
   14 | if('A'<=t[i] && t[i]<='Z')t[i] += 32;
      |                  ^
a.cc:14:28: error: invalid types 'int[int]' for array subscript
   14 | if('A'<=t[i] && t[i]<='Z')t[i] += 32;
      |                            ^
a.cc:15:5: error: invalid types 'int[int]' for array subscript
   15 | if(t[i]!=s[i]){
      |     ^
a.cc:15:11: error: invalid types 'int[int]' for array subscript
   15 | if(t[i]!=s[i]){
      |           ^
Language: C++

#include<stdio.h>

int main()
{
   char w[11],end[]="END_OF_TEXT",t[1001];
   int i,count=0;
   for(i=0;i<11;i++){
      w[i]=0;
   }
   for(i=0;i<1001;i++){
      t[i]=0;
   }
   scanf("%s",w);
   for(;;){
      scanf("%s",t);
      if(strcmp(t,"END_OF_TEXT")==0) break;
      if(strcmp(w,t)==0) count++;
   }
   printf("%d\n",count);
   return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:16:10: error: 'strcmp' was not declared in this scope
   16 |       if(strcmp(t,"END_OF_TEXT")==0) break;
      |          ^~~~~~
a.cc:2:1: note: 'strcmp' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
    1 | #include<stdio.h>
  +++ |+#include <cstring>
    2 | 
a.cc:17:10: error: 'strcmp' was not declared in this scope
   17 |       if(strcmp(w,t)==0) count++;
      |          ^~~~~~
a.cc:17:10: note: 'strcmp' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
Language: C++

#include <cmath>
#include <ctime>
#include <algorithm>
#include <iostream>
#include <map>
#include <numeric>
#include <set>
#include <sstream>
#include <string>
#include <vector>
#include <list>
#include <deque>
#include <stack>
#include <bitset>
#include <functional>
#include <numeric>
#include <utility>
#include <iomanip>
#include <cstdio>
#include <cctype>
#include <queue>
#include <complex>
#include <climits>

typedef long long ll;

using namespace std;


int main(void){
	char W[11];
	char T[1001];

	scanf("%s", W);

	int count = 0;

	while(1){
		scanf("%s", T);
		if(strcmp(T, "END_OF_TEXT") == 0) break;

		for(int i=0; i<strlen(T); i++){
			T[i] = tolower(T[i]);	
		}

		if(strcmp(W, T) == 0) count++;
	}


	cout << count << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:40:20: error: 'strcmp' was not declared in this scope
   40 |                 if(strcmp(T, "END_OF_TEXT") == 0) break;
      |                    ^~~~~~
a.cc:24:1: note: 'strcmp' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
   23 | #include <climits>
  +++ |+#include <cstring>
   24 | 
a.cc:42:32: error: 'strlen' was not declared in this scope
   42 |                 for(int i=0; i<strlen(T); i++){
      |                                ^~~~~~
a.cc:42:32: note: 'strlen' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
a.cc:46:20: error: 'strcmp' was not declared in this scope
   46 |                 if(strcmp(W, T) == 0) count++;
      |                    ^~~~~~
a.cc:46:20: note: 'strcmp' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
Language: C++

#include <cmath>
#include <ctime>
#include <algorithm>
#include <iostream>
#include <map>
#include <numeric>
#include <set>
#include <sstream>
#include <string>
#include <vector>
#include <list>
#include <deque>
#include <stack>
#include <bitset>
#include <functional>
#include <numeric>
#include <utility>
#include <iomanip>
#include <cstdio>
#include <cctype>
#include <queue>
#include <complex>
#include <climits>
#include <cstring>

typedef long long ll;

using namespace std;


int main(void){
	string W, T;
	int count = 0;

	cin >> W;

	while(1){
		cin >> T;
		if(T == "END_OF_TEXT") break;
		transform(T.begin(), T.end(), T.begin(),　tolower);
		if(W == T) count++;
	}

	cout << count << endl;
}

Compiler output:
a.cc:40:57: error: extended character 　 is not valid in an identifier
   40 |                 transform(T.begin(), T.end(), T.begin(),　tolower);
      |                                                         ^
a.cc: In function 'int main()':
a.cc:40:57: error: '\U00003000tolower' was not declared in this scope; did you mean 'tolower'?
   40 |                 transform(T.begin(), T.end(), T.begin(),　tolower);
      |                                                         ^~~~~~~~~
      |                                                         tolower
Language: C++

#include <cmath>
#include <ctime>
#include <algorithm>
#include <iostream>
#include <map>
#include <numeric>
#include <set>
#include <sstream>
#include <string>
#include <vector>
#include <list>
#include <deque>
#include <stack>
#include <bitset>
#include <functional>
#include <numeric>
#include <utility>
#include <iomanip>
#include <cstdio>
#include <cctype>
#include <queue>
#include <complex>
#include <climits>
#include <cstring>

typedef long long ll;

using namespace std;


int main(void){
	string W, T;
	int count = 0;

	cin >> W;

	while(1){
		cin >> T;
		if(T == "END_OF_TEXT") break;
		transform(T.begin(), T.end(), T.begin(), tolower());
		if(W == T) count++;
	}

	cout << count << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:40:65: error: no matching function for call to 'tolower()'
   40 |                 transform(T.begin(), T.end(), T.begin(), tolower());
      |                                                          ~~~~~~~^~
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:4:
/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, 0 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:12: note:   candidate expects 1 argument, 0 provided
Language: C++

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

int main()
{
	string w,t;
	cin>>w;
	int ans=0;
	while(1)
	{
		cin>>t;
		if(t=="END_OF_TEXT") break;
		if(!strcasecmp(w.c_str(),t.c_str())) ans++;
	}
	cout<<ans<<endl;
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:14:21: error: 'strcasecmp' was not declared in this scope; did you mean 'wcscasecmp'?
   14 |                 if(!strcasecmp(w.c_str(),t.c_str())) ans++;
      |                     ^~~~~~~~~~
      |                     wcscasecmp
Language: C++


#include <iostream>
#include <cstdlib>
#include <cstdio>
#include <math.h>
#include <string.h>
#include <stack>
#include <cctype>

using namespace std;


string Utol(string s){
	int n=s.size();
	for(int i=0;i<n;i++){
		if(isupper(s[i]))
			s[i]=tolower(s[i]);
	}
	return s;
}


int main(){

	int cnt=0;
	string str,str2;

	cin>>str;
	str=Utol(str);
	while(1){
		cin>>str2;
		if(str2=="END_OF_TEXT")
			break;
		str2=Utol(str2);
		if(stramp(str,str2)==0)
			cnt++;
	}
	cout<<cnt<<endl;
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:35:20: error: 'stramp' was not declared in this scope; did you mean 'strcmp'?
   35 |                 if(stramp(str,str2)==0)
      |                    ^~~~~~
      |                    strcmp
Language: C++

#include<iostream>
#include<string>

using namespace std;

int main(void){
	string W,T;
	int i=0;

	cin >> W;
	do{
		cin >> T;
		if(_stricmp(W.c_str(),T.c_str())==0)
			i++;
	}while(T!="END_OF_TEXT");
	cout << i << endl;

	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:13:20: error: '_stricmp' was not declared in this scope
   13 |                 if(_stricmp(W.c_str(),T.c_str())==0)
      |                    ^~~~~~~~
Language: C++

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

int find(const char *str, const char *word)
{
    int cnt = 0;
    for (char *p = str; *p; ++p) {
        if (*p == *word) {
            char *q = p, *w = word;
            for ( ; *q == *w && *w; ++q, ++w) ;
            if (*w == '\0') ++cnt;
        }
    }
}

int main()
{
    char w[11];
    fgets(w, 11, stdin);

    int cnt = 0;
    while (true) {
        char s[1001];
        fgets(s, 1001, stdin);
        if (strcmp(s, "END_OF_TEXT") == 0) break;
        cnt += find(s, w);
    }
    printf("%d\n", cnt);
    return 0;
}

Compiler output:
a.cc: In function 'int find(const char*, const char*)':
a.cc:7:20: error: invalid conversion from 'const char*' to 'char*' [-fpermissive]
    7 |     for (char *p = str; *p; ++p) {
      |                    ^~~
      |                    |
      |                    const char*
a.cc:9:31: error: invalid conversion from 'const char*' to 'char*' [-fpermissive]
    9 |             char *q = p, *w = word;
      |                               ^~~~
      |                               |
      |                               const char*
a.cc:14:1: warning: no return statement in function returning non-void [-Wreturn-type]
   14 | }
      | ^
Language: C++

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

int find(const char *str, const char *word)
{
    int cnt = 0;
    for (char *p = str; *p; ++p) {
        if (*p == *word) {
            char *q = p, *w = word;
            for ( ; *q == *w && *w; ++q, ++w) ;
            if (*w == '\0') ++cnt;
        }
    }
    return cnt;
}

int main()
{
    char w[11];
    fgets(w, 11, stdin);

    int cnt = 0;
    while (true) {
        char s[1001];
        fgets(s, 1001, stdin);
        if (strcmp(s, "END_OF_TEXT") == 0) break;
        cnt += find(s, w);
    }
    printf("%d\n", cnt);
    return 0;
}

Compiler output:
a.cc: In function 'int find(const char*, const char*)':
a.cc:7:20: error: invalid conversion from 'const char*' to 'char*' [-fpermissive]
    7 |     for (char *p = str; *p; ++p) {
      |                    ^~~
      |                    |
      |                    const char*
a.cc:9:31: error: invalid conversion from 'const char*' to 'char*' [-fpermissive]
    9 |             char *q = p, *w = word;
      |                               ^~~~
      |                               |
      |                               const char*