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

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

#define text 1002

char *name="Hoshina";
char *wrong_name="Hoshino";
char *delim=" ";
char *ctx;

int main(void){
	int i,j,n,length,count,now;
	char buf[2];
	char istr[text],istr_cpy[text],*next;

	scanf("%d",&n);
	fgets(buf,sizeof(buf),stdin);
	for(i=0;i<n;i++){
		fgets(istr,sizeof(istr),stdin);
		length=strlen(istr);
		istr[length-1]='\0';

		for(j=0;j<length;j++) istr_cpy[j]=istr[j];
		istr_cpy[j]='\0';

		now=count=0;
		next = strtok_s(istr, delim, &ctx);
		while(next){
			if(strcmp(wrong_name, next)==0){
				for(j=count;j>=0;now++){
					if(j==0)break;
					if(istr_cpy[now]==' '){
						j--;
					}
				}
				for(j=0;j<7;j++){
					istr_cpy[now+j]=name[j];
				}
			}
			count++;
			next = strtok_s(NULL, delim, &ctx);
		}

		printf("%s\n",istr_cpy);
	}
	
	return 0;
}

Compiler output:
main.c: In function 'main':
main.c:28:24: error: implicit declaration of function 'strtok_s'; did you mean 'strtok_r'? [-Wimplicit-function-declaration]
   28 |                 next = strtok_s(istr, delim, &ctx);
      |                        ^~~~~~~~
      |                        strtok_r
main.c:28:22: error: assignment to 'char *' from 'int' makes pointer from integer without a cast [-Wint-conversion]
   28 |                 next = strtok_s(istr, delim, &ctx);
      |                      ^
main.c:42:30: error: assignment to 'char *' from 'int' makes pointer from integer without a cast [-Wint-conversion]
   42 |                         next = strtok_s(NULL, delim, &ctx);
      |                              ^
Language: C

#include<stdio.h>
#include<string.h>
int main(){
    char s[2000];
    int n, i, j, key = 0;
    scanf("%d ", &n);
    while( n-- ) {
        gets(s);
        for ( i = 0; i < strlen(s); i++ ) {
            if ( s[i] == 'H' ) {
                if ( s[i+1] == 'o' && s[i+2] == 's' && s[i+3] == 'h' && s[i+4] == 'i' && s[i+5] == 'n' && s[i+6] == 'o') {
                    s[i+6] = 'a';
                }
            }
        }
        printf("%s\n", s);
        key++;
    }    
    return 0;
}

Compiler output:
main.c: In function 'main':
main.c:8:9: error: implicit declaration of function 'gets'; did you mean 'fgets'? [-Wimplicit-function-declaration]
    8 |         gets(s);
      |         ^~~~
      |         fgets
Language: C

main(){Congrats_AOJ___Tohoku_Be_Strong();}

Compiler output:
main.c:1:1: error: return type defaults to 'int' [-Wimplicit-int]
    1 | main(){Congrats_AOJ___Tohoku_Be_Strong();}
      | ^~~~
main.c: In function 'main':
main.c:1:8: error: implicit declaration of function 'Congrats_AOJ___Tohoku_Be_Strong' [-Wimplicit-function-declaration]
    1 | main(){Congrats_AOJ___Tohoku_Be_Strong();}
      |        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Language: C

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

int main(void){
	char Hoshina[1001];
	char Block[501][501];
	int i;
	int j;
	int k;
	int l;
	int disp;
	
	scanf("%d", &i);
	
	while (i >= 0){
		
		gets(Hoshina);
		
		j = 0;
		k = 0;
		l = 0;
		
		while(Hoshina[j] != '\0'){
			if (Hoshina[j] != ' '){
				Block[k][l] = Hoshina[j];
				j++;
				l++;
			}
			else{
				Block[k][l] = '\0';
				l = 0;
				j++;
				k++;
			}
		}
		
		Block[k][l] = '\0';
		
		disp = 0;
		
		while(disp != k + 1){
			if( strcmp(Block[disp],"Hoshino") == 0){
				strcpy(Block[disp],"Hoshina");
			}
			printf("%s", Block[disp]);
			if(disp != k){
				printf(" ");
			}
			else{
				printf("\n");
			}
			disp++;
		}
		
		i--;
	}
	
	return (0);
}

Compiler output:
main.c: In function 'main':
main.c:17:17: error: implicit declaration of function 'gets'; did you mean 'fgets'? [-Wimplicit-function-declaration]
   17 |                 gets(Hoshina);
      |                 ^~~~
      |                 fgets
Language: C

char*p,s[1005];
main(i){
	for(;fgets(s,1005,stdin);--i&&printf(s))for(;p=strstr(s,"Hoshino");p[6]='a');
	exit(0);
}

Compiler output:
main.c:2:1: error: return type defaults to 'int' [-Wimplicit-int]
    2 | main(i){
      | ^~~~
main.c: In function 'main':
main.c:2:1: error: type of 'i' defaults to 'int' [-Wimplicit-int]
main.c:3:14: error: implicit declaration of function 'fgets' [-Wimplicit-function-declaration]
    3 |         for(;fgets(s,1005,stdin);--i&&printf(s))for(;p=strstr(s,"Hoshino");p[6]='a');
      |              ^~~~~
main.c:3:27: error: 'stdin' undeclared (first use in this function)
    3 |         for(;fgets(s,1005,stdin);--i&&printf(s))for(;p=strstr(s,"Hoshino");p[6]='a');
      |                           ^~~~~
main.c:1:1: note: 'stdin' is defined in header '<stdio.h>'; this is probably fixable by adding '#include <stdio.h>'
  +++ |+#include <stdio.h>
    1 | char*p,s[1005];
main.c:3:27: note: each undeclared identifier is reported only once for each function it appears in
    3 |         for(;fgets(s,1005,stdin);--i&&printf(s))for(;p=strstr(s,"Hoshino");p[6]='a');
      |                           ^~~~~
main.c:3:39: error: implicit declaration of function 'printf' [-Wimplicit-function-declaration]
    3 |         for(;fgets(s,1005,stdin);--i&&printf(s))for(;p=strstr(s,"Hoshino");p[6]='a');
      |                                       ^~~~~~
main.c:3:39: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:3:39: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch]
main.c:3:39: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:3:56: error: implicit declaration of function 'strstr' [-Wimplicit-function-declaration]
    3 |         for(;fgets(s,1005,stdin);--i&&printf(s))for(;p=strstr(s,"Hoshino");p[6]='a');
      |                                                        ^~~~~~
main.c:1:1: note: include '<string.h>' or provide a declaration of 'strstr'
  +++ |+#include <string.h>
    1 | char*p,s[1005];
main.c:3:56: warning: incompatible implicit declaration of built-in function 'strstr' [-Wbuiltin-declaration-mismatch]
    3 |         for(;fgets(s,1005,stdin);--i&&printf(s))for(;p=strstr(s,"Hoshino");p[6]='a');
      |                                                        ^~~~~~
main.c:3:56: note: include '<string.h>' or provide a declaration of 'strstr'
main.c:4:9: error: implicit declaration of function 'exit' [-Wimplicit-function-declaration]
    4 |         exit(0);
      |         ^~~~
main.c:1:1: note: include '<stdlib.h>' or provide a declaration of 'exit'
  +++ |+#include <stdlib.h>
    1 | char*p,s[1005];
main.c:4:9: warning: incompatible implicit declaration of built-in function 'exit' [-Wbuiltin-declaration-mismatch]
    4 |         exit(0);
      |         ^~~~
main.c:4:9: note: include '<stdlib.h>' or provide a declaration of 'exit'
Language: C

char*p,s[1005];strstr();
main(i){
	for(;fgets(s,1005,stdin);--i&&printf(s))for(;p=strstr(s,"Hoshino");p[6]='a');
	exit(0);
}

Compiler output:
main.c:1:16: warning: data definition has no type or storage class
    1 | char*p,s[1005];strstr();
      |                ^~~~~~
main.c:1:16: error: type defaults to 'int' in declaration of 'strstr' [-Wimplicit-int]
main.c:1:16: warning: conflicting types for built-in function 'strstr'; expected 'char *(const char *, const char *)' [-Wbuiltin-declaration-mismatch]
main.c:1:1: note: 'strstr' is declared in header '<string.h>'
  +++ |+#include <string.h>
    1 | char*p,s[1005];strstr();
main.c:2:1: error: return type defaults to 'int' [-Wimplicit-int]
    2 | main(i){
      | ^~~~
main.c: In function 'main':
main.c:2:1: error: type of 'i' defaults to 'int' [-Wimplicit-int]
main.c:3:14: error: implicit declaration of function 'fgets' [-Wimplicit-function-declaration]
    3 |         for(;fgets(s,1005,stdin);--i&&printf(s))for(;p=strstr(s,"Hoshino");p[6]='a');
      |              ^~~~~
main.c:3:27: error: 'stdin' undeclared (first use in this function)
    3 |         for(;fgets(s,1005,stdin);--i&&printf(s))for(;p=strstr(s,"Hoshino");p[6]='a');
      |                           ^~~~~
main.c:1:1: note: 'stdin' is defined in header '<stdio.h>'; this is probably fixable by adding '#include <stdio.h>'
  +++ |+#include <stdio.h>
    1 | char*p,s[1005];strstr();
main.c:3:27: note: each undeclared identifier is reported only once for each function it appears in
    3 |         for(;fgets(s,1005,stdin);--i&&printf(s))for(;p=strstr(s,"Hoshino");p[6]='a');
      |                           ^~~~~
main.c:3:39: error: implicit declaration of function 'printf' [-Wimplicit-function-declaration]
    3 |         for(;fgets(s,1005,stdin);--i&&printf(s))for(;p=strstr(s,"Hoshino");p[6]='a');
      |                                       ^~~~~~
main.c:3:39: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:3:39: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch]
main.c:3:39: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:3:55: error: assignment to 'char *' from 'int' makes pointer from integer without a cast [-Wint-conversion]
    3 |         for(;fgets(s,1005,stdin);--i&&printf(s))for(;p=strstr(s,"Hoshino");p[6]='a');
      |                                                       ^
main.c:4:9: error: implicit declaration of function 'exit' [-Wimplicit-function-declaration]
    4 |         exit(0);
      |         ^~~~
main.c:1:1: note: include '<stdlib.h>' or provide a declaration of 'exit'
  +++ |+#include <stdlib.h>
    1 | char*p,s[1005];strstr();
main.c:4:9: warning: incompatible implicit declaration of built-in function 'exit' [-Wbuiltin-declaration-mismatch]
    4 |         exit(0);
      |         ^~~~
main.c:4:9: note: include '<stdlib.h>' or provide a declaration of 'exit'
Language: C

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.ArrayList;
import java.util.List;

public class Main {
	public static void main(String[] args) throws NumberFormatException, IOException {

		int n;
		List<String> 	mesList = new ArrayList<String>();
		BufferedReader bufferedReader = new BufferedReader(new InputStreamReader(System.in));

		n = Integer.parseInt(bufferedReader.readLine());

		for(int i = 0; i < n; i++){
			mesList.add(bufferedReader.readLine());
		}

		for(String mes : mesList)	System.out.println(mes.replaceAll("Hoshino", "Hoshina"));

	}
}

Compiler output:
main.c:1:1: error: unknown type name 'import'
    1 | import java.io.BufferedReader;
      | ^~~~~~
main.c:1:12: error: expected '=', ',', ';', 'asm' or '__attribute__' before '.' token
    1 | import java.io.BufferedReader;
      |            ^
main.c:2:1: error: unknown type name 'import'
    2 | import java.io.IOException;
      | ^~~~~~
main.c:2:12: error: expected '=', ',', ';', 'asm' or '__attribute__' before '.' token
    2 | import java.io.IOException;
      |            ^
main.c:3:1: error: unknown type name 'import'
    3 | import java.io.InputStreamReader;
      | ^~~~~~
main.c:3:12: error: expected '=', ',', ';', 'asm' or '__attribute__' before '.' token
    3 | import java.io.InputStreamReader;
      |            ^
main.c:4:1: error: unknown type name 'import'
    4 | import java.util.ArrayList;
      | ^~~~~~
main.c:4:12: error: expected '=', ',', ';', 'asm' or '__attribute__' before '.' token
    4 | import java.util.ArrayList;
      |            ^
main.c:5:1: error: unknown type name 'import'
    5 | import java.util.List;
      | ^~~~~~
main.c:5:12: error: expected '=', ',', ';', 'asm' or '__attribute__' before '.' token
    5 | import java.util.List;
      |            ^
main.c:7:1: error: unknown type name 'public'
    7 | public class Main {
      | ^~~~~~
main.c:7:14: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'Main'
    7 | public class Main {
      |              ^~~~
Language: C

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


int main(void){

	int i,n;
	char *p;
	char a[1002];
	char word[]="hoshino"
	scanf("%d\n",&n);
	for(i = 0;i < n;i++){
        fgets(a,sizeof(a),stdin);
        while((p = strstr(a,word))!=NULL){
            p[6] = 'a';
        }
                printf("%s",a);

    }


return 0;
}

Compiler output:
main.c: In function 'main':
main.c:11:9: error: expected ',' or ';' before 'scanf'
   11 |         scanf("%d\n",&n);
      |         ^~~~~
Language: C

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

int main(void)
{
	int a,n;
	char english[1000],correct[]="Hoshino",*b;
	scanf("%d\n",&n);

	for(a=0;a<n;a++){
		fgets(english,1000,stdin);
		while((b=strstr(english,correct))=NULL)
			b[6]='a';
		printf("%s",english);
	}
	return 0;

}

Compiler output:
main.c: In function 'main':
main.c:12:50: error: lvalue required as left operand of assignment
   12 |                 while((b=strstr(english,correct))=NULL)
      |                                                  ^
Language: C

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

#define rep(i,j) for(int i=0;i<(j);i++)

int main(){
	int n;
	char s[1001];
	char *p;
	scanf("%d",&n);while(getchar()!='\n');
	rep(i,n){
		gets(s);
		p=strstr(s,"Hoshino");
		if(p!=NULL)p[6]='a';
		puts(s);
	}
	return 0;
}

Compiler output:
main.c: In function 'main':
main.c:13:17: error: implicit declaration of function 'gets'; did you mean 'fgets'? [-Wimplicit-function-declaration]
   13 |                 gets(s);
      |                 ^~~~
      |                 fgets
Language: C++

n = int(input())
for _ in range(n):
  s = input()
  print(s.replace('Hoshino', 'Hoshina'))



Compiler output:
a.cc:4:19: warning: multi-character literal with 7 characters exceeds 'int' size of 4 bytes
    4 |   print(s.replace('Hoshino', 'Hoshina'))
      |                   ^~~~~~~~~
a.cc:4:30: warning: multi-character literal with 7 characters exceeds 'int' size of 4 bytes
    4 |   print(s.replace('Hoshino', 'Hoshina'))
      |                              ^~~~~~~~~
a.cc:1:1: error: 'n' does not name a type
    1 | n = int(input())
      | ^
Language: C++

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

using namespace std;

string s;

signed main()
{
    int n = 0;
    scanf( "%d\n", &n );
    while( 0 < n )
    {
        getline( cin, s );
        s = replace( s, "Hoshino", "Hoshina" );
        cout << s << endl;
        n--;
    }
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:16:13: error: 'replace' was not declared in this scope
   16 |         s = replace( s, "Hoshino", "Hoshina" );
      |             ^~~~~~~
Language: C++

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

void strReplace(string& str, const string& from, const string& to){
	string::size_type pos = 0;
	while(pos = str.find(from, pos), pos != string::npos){
		str.replace(pos, from.length(), to);
		pos += to.length();
	}
}

int main(){
	cin >> n;
	cin.clear();
	cin.ignore();
	for(int i = 0; i < n; i++){
		string s;
		getline(cin, s);
		strReplace(s, "Hoshino","Hoshina");
		cout << s << endl;
	}
}

Compiler output:
a.cc: In function 'int main()':
a.cc:13:16: error: 'n' was not declared in this scope; did you mean 'yn'?
   13 |         cin >> n;
      |                ^
      |                yn
Language: C++

import java.util.*;
public class AOJ0101 {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int t = sc.nextInt();
		sc.nextLine();
		while(t--!=0)
			System.out.println(sc.nextLine().replace("Hoshino", "Hoshina"));
	}
}

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:2:1: error: expected unqualified-id before 'public'
    2 | public class AOJ0101 {
      | ^~~~~~
Language: C++

readline.to_i.times do 
  puts readline.chomp.gsub(/Hoshino/, 'Hoshina')
end

Compiler output:
a.cc:2:39: warning: multi-character literal with 7 characters exceeds 'int' size of 4 bytes
    2 |   puts readline.chomp.gsub(/Hoshino/, 'Hoshina')
      |                                       ^~~~~~~~~
a.cc:1:1: error: 'readline' does not name a type
    1 | readline.to_i.times do
      | ^~~~~~~~
Language: C++

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

int main (){
  int n;
  int pos;
  string s;

  cin >> n;
  //  cin.ignore();                                                             
  for (int i = 0; i < n ; ++i){
    getline(cin, s);
    while(1){
      pos = s.find("Hoshino");
      if(pos == -1) break;
      s[pos+6] = 'a';
    }
    cout << s << '\n';
  }
  return 0;

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

#include <iostream>
#include <string>

int main(){

	const std::string correct_word = "Hoshina";
	const std::string find_word = "Hoshino";
	std::string str;
	
	while(std::cin >> str){

		std::string::size_type pos = str.find("Hoshino")
		
		while(pos != std::string::nops){
			 std::replace(pos, find_word.length(), correct_word);
			 pos = str.find(find_word, pos + find_word.length());
		}
	
	std::cout << str << std::endl;
	}
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:14:17: error: expected ',' or ';' before 'while'
   14 |                 while(pos != std::string::nops){
      |                 ^~~~~
Language: C++

#include <iostream>
#include <string>

int main(){

	const std::string correct_word = "Hoshina";
	const std::string find_word = "Hoshino";
	std::string str;
	
	while(std::cin >> str){

		std::string::size_type pos = str.find("Hoshino");
		
		while(pos != std::string::nops){
			 std::replace(pos, find_word.length(), correct_word);
			 pos = str.find(find_word, pos + find_word.length());
		}
	
	std::cout << str << std::endl;
	}
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:14:43: error: 'nops' is not a member of 'std::string' {aka 'std::__cxx11::basic_string<char>'}
   14 |                 while(pos != std::string::nops){
      |                                           ^~~~
a.cc:15:31: error: 'replace' is not a member of 'std'
   15 |                          std::replace(pos, find_word.length(), correct_word);
      |                               ^~~~~~~
Language: C++

#include <iostream>
#include <string>

int main(){

	const std::string correct_word = "Hoshina";
	const std::string find_word = "Hoshino";
	std::string str;
	
	while(std::cin >> str){

		std::string::size_type pos = str.find("Hoshino");
		
		while(pos != std::string::nops){
			 str.replace(pos, find_word.length(), correct_word);
			 pos = str.find(find_word, pos + find_word.length());
		}
	
	std::cout << str << std::endl;
	}
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:14:43: error: 'nops' is not a member of 'std::string' {aka 'std::__cxx11::basic_string<char>'}
   14 |                 while(pos != std::string::nops){
      |                                           ^~~~
Language: C++

#include <iostream>
#include <string>

int main(){

	const std::string correct_word = "Hoshina";
	const std::string find_word = "Hoshino";
	std::string str;
	
	int N;

	std::cin >> N;

	for(int i = 0; i < N; ++i){
		
		std::cin >> str
		std::string::size_type pos = str.find("Hoshino");
		
		while(pos != std::string::nops){
			 str.replace(pos, find_word.length(), correct_word);
			 pos = str.find(find_word, pos + find_word.length());
		}
	
	std::cout << str << std::endl;
	}
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:16:32: error: expected ';' before 'std'
   16 |                 std::cin >> str
      |                                ^
      |                                ;
   17 |                 std::string::size_type pos = str.find("Hoshino");
      |                 ~~~             
a.cc:19:23: error: 'pos' was not declared in this scope
   19 |                 while(pos != std::string::nops){
      |                       ^~~
a.cc:19:43: error: 'nops' is not a member of 'std::string' {aka 'std::__cxx11::basic_string<char>'}
   19 |                 while(pos != std::string::nops){
      |                                           ^~~~
Language: C++

#include <iostream>
#include <string>

int main(){

	const std::string correct_word = "Hoshina";
	const std::string find_word = "Hoshino";
	std::string str;
	
	int N;

	std::cin >> N;

	for(int i = 0; i < N; ++i){
		
		std::cin >> str;
		std::string::size_type pos = str.find("Hoshino");
		
		while(pos != std::string::nops){
			 str.replace(pos, find_word.length(), correct_word);
			 pos = str.find(find_word, pos + find_word.length());
		}
	
	std::cout << str << std::endl;
	}
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:19:43: error: 'nops' is not a member of 'std::string' {aka 'std::__cxx11::basic_string<char>'}
   19 |                 while(pos != std::string::nops){
      |                                           ^~~~
Language: C++

#include <iostream>
#include <string>

int main(){

	const std::string correct_word = "Hoshina";
	const std::string find_word = "Hoshino";
	
	int N;

	std::cin >> N;

	for(int i = 0; i < N; ++i){
	
		std::string str;
		std::cin >> str;

		std::string::size_type pos = str.find("Hoshino");
		
		while(pos != std::string::nops){

			 str.replace(pos, find_word.length(), correct_word);

			 pos = str.find(find_word, pos + find_word.length());
		}
	
	std::cout << str << std::endl;
	
	}
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:20:43: error: 'nops' is not a member of 'std::string' {aka 'std::__cxx11::basic_string<char>'}
   20 |                 while(pos != std::string::nops){
      |                                           ^~~~
Language: C++

#include <iostream>
#include <string>

int main(){
	int n; // the number of datasets
	std::cin >> n;
	std::cin.ignore();

	for(int i = 0; i < n; ++i){
		std::string text;
		std::getline(std::cin, text); // input
		
		int text_size = text.size();
		int moji = text.find("Hoshino");
		while(moji != basic_string::npos){
			text.replace(moji, 7, "Hoshina");
			moji = text.find("Hoshino", moji);
		}
		
		std::cout << text << std::endl; //output
	}

	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:15:31: error: 'basic_string' has not been declared
   15 |                 while(moji != basic_string::npos){
      |                               ^~~~~~~~~~~~
Language: C++

#include <iostream>
#include <vector>
#include <algorithm>
#include <string>

int main(){
	std::string correctword = "Hoshina";

    int dataSetNum;
    std::cin >> dataSetNum;

    std::vector< std::string > str;
    str.resize(dataSetNum);
    std::cin.ignore();

    //input 
    for(int i = 0; i < dataSetNum; ++i){
        //input
        std::string tmp;
        getline(std::cin, tmp);
        str[i] = tmp;
    }

    //replace
    for(int i = 0; i < dataSetNum; ++i){
    	std::string tmp = "Hoshino";
        //std::string::size_type pos = str[i].find(tmp);
        auto pos = str[i].find(tmp);
        while(pos != std::string::npos){
        	str[i].replace(str[i].begin() + pos, str[i].begin() + pos + 7, correctword.begin(), correctword.end() );
        	pos = str[i].find(tmp, pos + 7);
        }

    }
    
    //output
    for(int i = 0; i < dataSetNum; ++i){
    	std::for_each(str[i].begin() , str[i].end(),
    [](std::string x) { std::cout << x << std::endl; } );
    }

    return 0;
}

Compiler output:
In file included from /usr/include/c++/14/algorithm:61,
                 from a.cc:3:
/usr/include/c++/14/bits/stl_algo.h: In instantiation of '_Funct std::for_each(_IIter, _IIter, _Funct) [with _IIter = __gnu_cxx::__normal_iterator<char*, __cxx11::basic_string<char> >; _Funct = main()::<lambda(string)>]':
a.cc:38:19:   required from here
   38 |         std::for_each(str[i].begin() , str[i].end(),
      |         ~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   39 |     [](std::string x) { std::cout << x << std::endl; } );
      |     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/14/bits/stl_algo.h:3786:12: error: no match for call to '(main()::<lambda(std::string)>) (char&)'
 3786 |         __f(*__first);
      |         ~~~^~~~~~~~~~
/usr/include/c++/14/bits/stl_algo.h:3786:12: note: candidate: 'void (*)(std::string)' {aka 'void (*)(std::__cxx11::basic_string<char>)'} (conversion)
/usr/include/c++/14/bits/stl_algo.h:3786:12: note:   candidate expects 2 arguments, 2 provided
a.cc:39:5: note: candidate: 'main()::<lambda(std::string)>'
   39 |     [](std::string x) { std::cout << x << std::endl; } );
      |     ^
a.cc:39:5: note:   no known conversion for argument 1 from 'char' to 'std::string' {aka 'std::__cxx11::basic_string<char>'}
Language: C++

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

using namespace std;

char str[1001];
char hoshino[] = "Hoshino";
int hlen = strlen(hoshino);

void changeHoshino(int len) {
	for (int i = 0; i <= len - hlen; i++) {
		int j = 0;
		while ((j < hlen) && (str[i+j] == hoshino[j]))
			j++;

		if (j == hlen)
			str[i+j-1] = 'a';
	}
}
int main() {
	int n;

	cin >> n;
	
	fgets(str, 1001, stdin);
	for (int i = 0; i < n; i++) {
		fgets(str, 1001, stdin);

		changeHoshino(strlen(str));

		cout << str;
	}

	return 0;
}

Compiler output:
a.cc:9:12: error: 'strlen' was not declared in this scope
    9 | int hlen = strlen(hoshino);
      |            ^~~~~~
a.cc:3:1: note: 'strlen' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
    2 | #include <cstdio>
  +++ |+#include <cstring>
    3 | #include <string>
a.cc: In function 'int main()':
a.cc:30:31: error: 'strlen' was not declared in this scope
   30 |                 changeHoshino(strlen(str));
      |                               ^~~~~~
a.cc:30:31: note: 'strlen' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
Language: C++

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

using namespace std;

string str;
string hoshino = "Hoshino";
int hlen = hoshino.length();

void changeHoshino(int len) {
	for (int i = 0; i <= len - hlen; i++) {
		int j = 0;
		while ((j < hlen) && (str[i+j] == hoshino[j]))
			j++;

		if (j == hlen)
			str[i+j-1] = 'a';
	}
}
int main() {
	int n;
	
	scanf_s("%d\n", &n);
	
	for (int i = 0; i < n; i++) {
		getline(cin, str);

		changeHoshino(str.length());

		cout << str << endl;
	}

	return 0;
}

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

#include<iostream>
using namespace std;

int main(){
	int dataN,i,j,tmp;
	string str;
	
	cin>>dataN;
	for(j=0;j<dataN;j++){
	 cin>>str;
	 for(i=0;i<str.length;i++){
	  if(str[i]+str[i+1]+str[i+2]+str[i+3]+str[i+4]+str[i+5]+str[i+6]=="Hoshino"){
	   str[i+6]='a';
	   i+=6;
	  }
	 }
	 cout<<str;
	}
	
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:11:24: error: invalid use of member function 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::size_type std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::length() const [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>; size_type = long unsigned int]' (did you forget the '()' ?)
   11 |          for(i=0;i<str.length;i++){
      |                    ~~~~^~~~~~
      |                              ()
a.cc:12:74: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   12 |           if(str[i]+str[i+1]+str[i+2]+str[i+3]+str[i+4]+str[i+5]+str[i+6]=="Hoshino"){
Language: C++

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

#define BAD "hoshino"

int main(){
	int n,i;
	
	cin>>n;
	for(i=0;i<n;i++){
	 hoge();
	}
	
	return 0;
}

int hoge(){
	string text;
	int i;
	
	cin>>text;
	for(i=0;i<text.length();i++){
	 if(text.substr(i,BAD.length())==BAD){
	  text[i+BAD.length()-1]='a';
	 }
	}
	
	cout<<text<<endl;
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:12:10: error: 'hoge' was not declared in this scope
   12 |          hoge();
      |          ^~~~
a.cc: In function 'int hoge()':
a.cc:24:31: error: request for member 'length' in '"hoshino"', which is of non-class type 'const char [8]'
   24 |          if(text.substr(i,BAD.length())==BAD){
      |                               ^~~~~~
a.cc:25:22: error: request for member 'length' in '"hoshino"', which is of non-class type 'const char [8]'
   25 |           text[i+BAD.length()-1]='a';
      |                      ^~~~~~
Language: C++

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

#define BAD "hoshino"

int hoge(void);

int main(){
	int n,i;
	
	cin>>n;
	for(i=0;i<n;i++){
	 hoge();
	}
	
	return 0;
}

int hoge(){
	string text;
	int i;
	
	cin>>text;
	for(i=0;i<text.length();i++){
	 if(text.substr(i,BAD.length())==BAD){
	  text[i+BAD.length()-1]='a';
	 }
	}
	
	cout<<text<<endl;
	return 0;
}

Compiler output:
a.cc: In function 'int hoge()':
a.cc:26:31: error: request for member 'length' in '"hoshino"', which is of non-class type 'const char [8]'
   26 |          if(text.substr(i,BAD.length())==BAD){
      |                               ^~~~~~
a.cc:27:22: error: request for member 'length' in '"hoshino"', which is of non-class type 'const char [8]'
   27 |           text[i+BAD.length()-1]='a';
      |                      ^~~~~~
Language: C++

#include<iostream>
#include<string>

using namespace std;

int main(){
	string text;
	int n,j;
	int i;
	
	cin>>n;
	for(j=0;j<n;j++){
	 cin>>text;
	 while(1){
	  i=text.find("Hoshino");
	  if(i!=string::not_found){
	   text[i+6]='a';
	  }else{
	   break;
	  }
	 }
	 cout<<text<<endl;
	}
}

Compiler output:
a.cc: In function 'int main()':
a.cc:16:25: error: 'not_found' is not a member of 'std::string' {aka 'std::__cxx11::basic_string<char>'}
   16 |           if(i!=string::not_found){
      |                         ^~~~~~~~~
Language: C++

#include<iostream>
using namespace std;

int main(){
	int n,j;
	int flg;
	char c;
	
	cin>>n;
	for(j=0;j<n;j++){
	 flg=0;
	 while(1){
	  c=getchar();
	  if(c==endl){
	   break;
	  }else{
	   switch(flg){
		case 0:
		if(c=='H'){flg++;}
		break;
		case 1:
		if(c=='o'){flg++;}else{flg=0;}
		break;
		case 2:
		if(c=='s'){flg++;}else{flg=0;}
		break;
		case 3:
		if(c=='h'){flg++;}else{flg=0;}
		break;
		case 4:
		if(c=='i'){flg++;}else{flg=0;}
		break;
		case 5:
		if(c=='n'){flg++;}else{flg=0;}
		break;
		case 6:
		if(c=='o'){c='a';}
		flg=0;
		break;
	   }
	   cout<<c;
	  }
	 }
	 cout<<endl;
	}
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:14:15: error: invalid operands of types 'char' and '<unresolved overloaded function type>' to binary 'operator=='
   14 |           if(c==endl){
      |              ~^~~~~~
Language: C++

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

int main(){
	int n,j;
	int flg;
	char c;
	
	cin>>n;
	for(j=0;j<n;j++){
	 //??\????????????
	 flg=0;
	 while(1){
	  c=getchar();
	  if(c==endl){
	   break;
	  }else{
	   switch(flg){
		case 0:
		if(c=='H'){flg++;}
		break;
		case 1:
		if(c=='o'){flg++;}else{flg=0;}
		break;
		case 2:
		if(c=='s'){flg++;}else{flg=0;}
		break;
		case 3:
		if(c=='h'){flg++;}else{flg=0;}
		break;
		case 4:
		if(c=='i'){flg++;}else{flg=0;}
		break;
		case 5:
		if(c=='n'){flg++;}else{flg=0;}
		break;
		case 6:
		if(c=='o'){c='a';}
		flg=0;
		break;
	   }
	   cout<<c;
	  }
	 }
	 cout<<endl;
	}
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:16:15: error: invalid operands of types 'char' and '<unresolved overloaded function type>' to binary 'operator=='
   16 |           if(c==endl){
      |              ~^~~~~~
Language: C++

n = int(input())
for i in range(n):
  l = [s for s in input().split()]
  for s in l:
    if 'Hoshino' in s:
      l[l.index(s)] = s.replace('Hoshino','Hoshina')
  a = ''
  for s in l:
    a += s
    a += ' '
  a = a.rstrip()
  print(a)

Compiler output:
a.cc:5:8: warning: multi-character literal with 7 characters exceeds 'int' size of 4 bytes
    5 |     if 'Hoshino' in s:
      |        ^~~~~~~~~
a.cc:6:33: warning: multi-character literal with 7 characters exceeds 'int' size of 4 bytes
    6 |       l[l.index(s)] = s.replace('Hoshino','Hoshina')
      |                                 ^~~~~~~~~
a.cc:6:43: warning: multi-character literal with 7 characters exceeds 'int' size of 4 bytes
    6 |       l[l.index(s)] = s.replace('Hoshino','Hoshina')
      |                                           ^~~~~~~~~
a.cc:7:7: error: empty character constant
    7 |   a = ''
      |       ^~
a.cc:1:1: error: 'n' does not name a type
    1 | n = int(input())
      | ^
Language: C++

using System;
class Example
{
    static void Main()
    {
        int n = int.Parse(Console.ReadLine());
        for (int a = 0; a < n; a++)
        {
            string[] input = Console.ReadLine().Split(' ');
            if (string.IsNullOrEmpty(input[0]))
                break;
            for (int i = 0; i < input.Length - 1; i++)
            {
                if (input[i] == "Hoshino")
                    input[i] = "Hoshina";
                Console.Write(input[i] + " ");
            }
            Console.WriteLine(input[input.Length - 1]);

        }
    }
}

Compiler output:
a.cc:1:7: error: expected nested-name-specifier before 'System'
    1 | using System;
      |       ^~~~~~
a.cc:22:2: error: expected ';' after class definition
   22 | }
      |  ^
      |  ;
a.cc: In static member function 'static void Example::Main()':
a.cc:6:17: error: expected primary-expression before 'int'
    6 |         int n = int.Parse(Console.ReadLine());
      |                 ^~~
a.cc:9:13: error: 'string' was not declared in this scope
    9 |             string[] input = Console.ReadLine().Split(' ');
      |             ^~~~~~
a.cc:9:20: error: expected primary-expression before ']' token
    9 |             string[] input = Console.ReadLine().Split(' ');
      |                    ^
a.cc:10:38: error: 'input' was not declared in this scope; did you mean 'int'?
   10 |             if (string.IsNullOrEmpty(input[0]))
      |                                      ^~~~~
      |                                      int
a.cc:12:33: error: 'input' was not declared in this scope; did you mean 'int'?
   12 |             for (int i = 0; i < input.Length - 1; i++)
      |                                 ^~~~~
      |                                 int
a.cc:16:17: error: 'Console' was not declared in this scope
   16 |                 Console.Write(input[i] + " ");
      |                 ^~~~~~~
a.cc:18:13: error: 'Console' was not declared in this scope
   18 |             Console.WriteLine(input[input.Length - 1]);
      |             ^~~~~~~
a.cc:18:31: error: 'input' was not declared in this scope; did you mean 'int'?
   18 |             Console.WriteLine(input[input.Length - 1]);
      |                               ^~~~~
      |                               int
Language: C++

#include<iostream>
#include<string>

using namespace std;

int main(void)
{
	int n;
	string a;

	cin >> n;
	cin.ignore();

	for (int i = 0; i < n; ++i){
		int x = 0;
		getline(cin, a);
		if ((x = a.find("Hoshino")) >= 0)
			a.replace(x, strlen("Hoshino"), "Hoshina");
		cout << a << endl;
	}
	
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:18:38: error: 'strlen' was not declared in this scope
   18 |                         a.replace(x, strlen("Hoshino"), "Hoshina");
      |                                      ^~~~~~
a.cc:2:1: note: 'strlen' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
    1 | #include<iostream>
  +++ |+#include <cstring>
    2 | #include<string>
Language: C++

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

using namespace std;

int main(void)
{
	int n;
	string a;

	cin >> n;
	cin.ignore();

	for (int i = 0; i < n; ++i){
		int x = 0;
		getline(cin, a);
		if ((x = a.find("Hoshino")) >= 0)
			a.replace(x, strlen("Hoshino"), "Hoshina");
		cout << a << endl;
	}
	
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:19:38: error: 'strlen' was not declared in this scope
   19 |                         a.replace(x, strlen("Hoshino"), "Hoshina");
      |                                      ^~~~~~
a.cc:4:1: note: 'strlen' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
    3 | #include<cstdio>
  +++ |+#include <cstring>
    4 |
Language: C++

#include <iostream>
#include <string>
   
int main(){
    const std::string wrong_word("Hoshino");
    const std::string right_word("Hoshina");
     
    int num;
    std::cin >> num;
    std::cin.ignore(); // ignore next newline character
       
    for(int i = 0; i < num; ++i){
        std::string str;
        std::getline(std::cin, str);
         
        std::size_t pos = str.find(wrong_word);
        while(pos != std::string::npos){
            str.replace(pos, wrong_word.length(), right_word);
            pos = str.find(wrong_word);
        }
         
        std::cout << str << std::endl;
    }
    return 0;

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

#include <iostream>
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <vector>
#include <algorithm>
#include <utility>
#include <queue>
int n;
using namespace std;
bool is_change(string& str,int pos, int len){
	const char A[] = {'H','o','s','h','i','n','a'};
	if(str.substr(pos,len) == "Hoshino"){
		for(int i=pos,j=0;i<pos+len,j<7;i++,j++){
			str[i] = A[j];
		}
		return true;
	}

	return false;
}
int main(){
	std::ios::sync_with_stdio(false);
	cin>>n;
	for(int i=0;i<n;i++){
		string str;
		for(int i=0;i+6<str.size();i++){
			if(change(str,i,7)){
				i+=6;
			}
		}
		cout<<str<<"\n";
	}
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:28:28: error: 'change' was not declared in this scope; did you mean 'is_change'?
   28 |                         if(change(str,i,7)){
      |                            ^~~~~~
      |                            is_change
Language: C++

//#include <bits/c++.h>
#include <iostream>
#include <cstdio>
#define rep(i,n) for(int i = 0; i< n; i++)
#define MAX_SIZE 1010

using namespace std;

int main(){
	
	int n;
	cin >> n;
//	cout << n << endl;
	for(int j = 0; j<= n; j++)
	{
	
		char s[MAX_SIZE] = {};
		gets(s);
		int i = 0;
		while(*(s+i) != '\0')
		{
			//printf("%c",*(s+i));
	         	bool check = true;
			if(*(s+i) == 'H')
		         if(*(s+i+1) == 'o')
			   if(*(s+i+2) =='s' )	
				if(*(s+i+3) =='h' )
					if(*(s+i+4) == 'i')
						if(*(s+i+5) == 'n' )
						if(*(s+i+6) == 'a')
						{
							cout << "Hoshino";
							i+=7;
							check = false;
						} 
		 if(*(s+i) != 'H' || check  == true)
		
			printf("%c",*(s+i));
			i++;
		}
			
		}
		if(j != 0) cout << endl;
	}
	return 0;

}

Compiler output:
a.cc: In function 'int main()':
a.cc:18:17: error: 'gets' was not declared in this scope; did you mean 'getw'?
   18 |                 gets(s);
      |                 ^~~~
      |                 getw
a.cc:43:20: error: 'j' was not declared in this scope
   43 |                 if(j != 0) cout << endl;
      |                    ^
a.cc: At global scope:
a.cc:45:9: error: expected unqualified-id before 'return'
   45 |         return 0;
      |         ^~~~~~
a.cc:47:1: error: expected declaration before '}' token
   47 | }
      | ^
Language: C++

//#include <bits/c++.h>
#include <iostream>
#include <cstdio>
#define rep(i,n) for(int i = 0; i< n; i++)
#define MAX_SIZE 1010

using namespace std;

int main(){
	
	int n;
	cin >> n;
//	cout << n << endl;
	for(int j = 0; j<=n; j++)
	{
	
		char s[MAX_SIZE] = {};
		gets(s);
		int i = 0;
		while(*(s+i) != '\0')
		{
			//printf("%c",*(s+i));
	         	bool check = true;
			if(*(s+i) == 'H')
		         if(*(s+i+1) == 'o')
			   if(*(s+i+2) =='s' )	
				if(*(s+i+3) =='h' )
					if(*(s+i+4) == 'i')
						if(*(s+i+5) == 'n' )
						if(*(s+i+6) == 'o')
						{
							cout << "Hoshina";
							i+=7;
							check = false;
						} 
		 if(*(s+i) != 'H' || check  == true)
		{
			printf("%c",*(s+i));
			i++;
		}
			
		}	
		 if(j)cout << endl;
	}
	if(j == false)
		cout << endl;  
	return 0;

}

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

//#include <bits/c++.h>
#include <iostream>
#include <cstdio>
#define rep(i,n) for(int i = 0; i< n; i++)
#define MAX_SIZE 1010

using namespace std;

int main(){
	
	int n;
	cin >> n;
//	cout << n << endl;
        int j;
	bool checking  = true;
	for( j = 0; j<=n; j++)
	{
		checking = true;
		char s[MAX_SIZE] = {};
		gets(s);
		int i = 0;
		while(*(s+i) != '\0')
		{
			//printf("%c",*(s+i));
	         	bool check = true;
			if(*(s+i) == 'H')
		         if(*(s+i+1) == 'o')
			   if(*(s+i+2) =='s' )	
				if(*(s+i+3) =='h' )
					if(*(s+i+4) == 'i')
						if(*(s+i+5) == 'n' )
						if(*(s+i+6) == 'o')
						{
							cout << "Hoshina";
							i+=7;
							check = false;
							checking = check;
						} 
		 if(*(s+i) != 'H' || check  == true)
		{
			printf("%c",*(s+i));
			i++;
		}
			checking = true;
		}	
		 if(j)cout << endl;
		 if(checking == false)
			{
				cout << endl;
				checking = true;
			}
		cout << endl;
	}
	return 0;

}

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

//#include <bits/c++.h>
#include <iostream>
#include <cstdio>
#include <stdio.h>
#define rep(i,n) for(int i = 0; i< n; i++)
#define MAX_SIZE 1010

using namespace std;

int main(){
	
	int n;
	cin >> n;
//	cout << n << endl;
        int j;
	bool checking  = true;
	for( j = 0; j<=n; j++)
	{
		checking = true;
		char s[MAX_SIZE] = {};
		gets(s);
		int i = 0;
		while(*(s+i) != '\0')
		{
			//printf("%c",*(s+i));
	         	bool check = true;
			if(*(s+i) == 'H')
		         if(*(s+i+1) == 'o')
			   if(*(s+i+2) =='s' )	
				if(*(s+i+3) =='h' )
					if(*(s+i+4) == 'i')
						if(*(s+i+5) == 'n' )
						if(*(s+i+6) == 'o')
						{
							cout << "Hoshina";
							i+=7;
							check = false;
							checking = check;
						} 
		 if(*(s+i) != 'H' || check  == true)
		{
			printf("%c",*(s+i));
			i++;
		}
			checking = true;
		}	
		 if(j)cout << endl;
		 if(checking == false)
			{
				cout << endl;
				checking = true;
			}
		cout << endl;
	}
	return 0;

}

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

#include<iostream>
#include<string>
#include<cstdio>
#include<algorithm>
#include<stack>
#include<queue>
#include<vector>
#include<cmath>
#include<utility>
#include<set>
#include<complex>
#include<map>
#define vi vector<int>
#define vvi vector<vector<int> >
#define ll long long int
#define vl vector<ll>
#define vvl vector<vector<ll>>
#define vb vector<bool>
#define vc vector<char>
#define vs vector<string>
#define ld long double
#define INF 1e9
#define EPS 0.0000000001
#define rep(i,n) for(int i=0;i<n;i++)
#define loop(i,s,n) for(int i=s;i<n;i++)
#define CC puts("-------ok--------");
#define all(in) in.begin(), in.end()
using namespace std;
#define MAX_SIZE 10000
typedef pair<int, int> pii;
#define MAX 99999999

int main(){
    
    int n;
    cin >> n;
    //	cout << n << endl;
    int j;
    bool checking  = true;
    for( j = 0; j<=n; j++)
    {
        checking = true;
        char s[MAX_SIZE] = {};
        gets(s);
        int i = 0;
        while(*(s+i) != '\0')
        {
            //printf("%c",*(s+i));
            bool check = true;
            if(*(s+i) == 'H')
                if(*(s+i+1) == 'o')
                    if(*(s+i+2) =='s' )
                        if(*(s+i+3) =='h' )
                            if(*(s+i+4) == 'i')
                                if(*(s+i+5) == 'n' )
                                    if(*(s+i+6) == 'o')
                                    {
                                        cout << "Hoshina";
                                        i+=7;
                                        check = false;
                                        checking = check;
                                    } 
            if(*(s+i) != 'H' || check  == true)
            {
                printf("%c",*(s+i));
                i++;
            }
            checking = true;
        }	
        if(j)cout << endl;
        if(checking == false)
        {
            cout << endl;
            checking = true;
        }
        cout << endl;
    }
    return 0;
    
}

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

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

int main()
{
	int n;
	char str[1000];

	scanf("%d", &n);
	for (int i = 0; i < n+1; i++) {
		gets(str);

		if(strstr(str, "Hoshino") != NULL) str[(strstr(str, "Hoshino") - str) + 6] = 'a';
		printf("%s\n", str);
	}

	return 0;
}

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

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

int main()
{
	int n;
	char str[1001];

	scanf("%d\n", &n);
	for (int i = 0; i < n; i++) {
		gets(str);

		while (1) {
			if(strstr(str, "Hoshino") != NULL) str[(strstr(str, "Hoshino") - str) + 6] = 'a';
			else break;
		}

		puts(str);
	}

	return 0;
}

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

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

int main(void) {
	int i,j;
	int n = 0;
	char strsent[50][1000] = { 0 };
	char work[1000] = { 0 };
	scanf("%d", &n);
	getchar();
	for(i = 0; i < n; i++) {
		// ???????????\???
		gets(strsent[i]);
	}
	for(i = 0; i < n; i++) {
		for(j = 0; strsent[i][j] != '\0'; j++){
			// null?????§??????
			if(	strsent[i][j+1] == '\0' ||
				strsent[i][j+2] == '\0' ||
				strsent[i][j+3] == '\0' ||
				strsent[i][j+4] == '\0' ||
				strsent[i][j+5] == '\0' ||
				strsent[i][j+6] == '\0' ) {
				// ???????????????????????°?????????????????§??????
				break;
			}
			if(	strsent[i][j]   == 'H' &&
				strsent[i][j+1] == 'o' &&
				strsent[i][j+2] == 's' &&
				strsent[i][j+3] == 'h' &&
				strsent[i][j+4] == 'i' &&
				strsent[i][j+5] == 'n' &&
				strsent[i][j+6] == 'o' ) {
				// Hoshino?????´??????Hoshina????¨???£
				strsent[i][j+6] = 'a';
			}
		}
		printf("%s\n", strsent[i]);
	}
	return 0;
}

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

#include <iostream>

int main(){
    int data_set_num;
    std::string str;
    std::string from = "Hoshino";
    std::string to = "Hoshina";

    std::cin >> data_set_num;

    while(data_set_num--){
        std::getline(cin,str);
        string::size_type pos = str.find(from);
        while(pos != string::npos){
            str.replace(pos, from.size(), to);
            pos = str.find(from, pos + to.size());
        }
        std::cout << str << std::endl;
    }

    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:12:22: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
   12 |         std::getline(cin,str);
      |                      ^~~
      |                      std::cin
In file included from a.cc:1:
/usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here
   62 |   extern istream cin;           ///< Linked to standard input
      |                  ^~~
a.cc:13:9: error: 'string' has not been declared
   13 |         string::size_type pos = str.find(from);
      |         ^~~~~~
a.cc:14:15: error: 'pos' was not declared in this scope
   14 |         while(pos != string::npos){
      |               ^~~
a.cc:14:22: error: 'string' has not been declared
   14 |         while(pos != string::npos){
      |                      ^~~~~~