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

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

using namespace std;
int main(void)
{
	char s[100];
	cin >> s;
	s[3] = ’8’;
	cout << s;
	return 0;
}

Compiler output:
a.cc:11:16: error: extended character ’ is not valid in an identifier
   11 |         s[3] = ’8’;
      |                ^
a.cc:11:16: error: extended character ’ is not valid in an identifier
a.cc: In function 'int main()':
a.cc:11:16: error: '\U000020198\U00002019' was not declared in this scope
   11 |         s[3] = ’8’;
      |                ^~~
Language: C++

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

using namespace std;
int main(void)
{
	char s[100];
	cin >> s;
	s[3] = ”8”;
	cout << s;
	return 0;
}

Compiler output:
a.cc:11:16: error: extended character ” is not valid in an identifier
   11 |         s[3] = ”8”;
      |                ^
a.cc:11:16: error: extended character ” is not valid in an identifier
a.cc: In function 'int main()':
a.cc:11:16: error: '\U0000201d8\U0000201d' was not declared in this scope
   11 |         s[3] = ”8”;
      |                ^~~
Language: C

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


int main(void){
    int i;
    char *tok;
    char text[20];
    char year[20];
    char mouth[20];
    char date[20];
    
    for(i = 0; i < 20; i++){
        text[i] = '\0';
        year[i] = '\0';
        mouth[i] = '\0';
        date[i] = '\0';
    }
    scanf("%s", text);
    tok = strtok(text, "/");
    strcpy(year, tok);
    tok = strtok(NULL, "/");
    if(tok != NULL){
        strcpy(mouth, tok);
    }
    tok = strtok(NULL, "/");
    if(tok != NULL){
        strcpy(date, tok);
    }
    if(strcmp(year, "2017") == 0){
        strcpy(year, "2018");
    }
    printf("%s/%s/%s\n", year, mouth, date);
}#include <stdio.h>
#include <stdlib.h>
#include <string.h>


int main(void){
    int i;
    char *tok;
    char text[20];
    char year[20];
    char mouth[20];
    char date[20];
    
    for(i = 0; i < 20; i++){
        text[i] = '\0';
        year[i] = '\0';
        mouth[i] = '\0';
        date[i] = '\0';
    }
    scanf("%s", text);
    tok = strtok(text, "/");
    strcpy(year, tok);
    tok = strtok(NULL, "/");
    if(tok != NULL){
        strcpy(mouth, tok);
    }
    tok = strtok(NULL, "/");
    if(tok != NULL){
        strcpy(date, tok);
    }
    if(strcmp(year, "2017") == 0){
        strcpy(year, "2018");
    }
    printf("%s/%s/%s\n", year, mouth, date);
}

Compiler output:
main.c:35:2: error: stray '#' in program
   35 | }#include <stdio.h>
      |  ^
main.c:35:11: error: expected '=', ',', ';', 'asm' or '__attribute__' before '<' token
   35 | }#include <stdio.h>
      |           ^
Language: Java

public class Main {
    public static void main(String args[]) {
        Scanner sc = new Scanner(System.in);
        String s = sc.next();
        System.out.println("2018" + s.substring(4));
    }
}

Compiler output:
Main.java:3: error: cannot find symbol
        Scanner sc = new Scanner(System.in);
        ^
  symbol:   class Scanner
  location: class Main
Main.java:3: error: cannot find symbol
        Scanner sc = new Scanner(System.in);
                         ^
  symbol:   class Scanner
  location: class Main
2 errors
Language: C++

#include <iostream>
using namespace std;
int main()
{
    string s;
    while(cin>>s){
        int l=s.length();
        for(int i=0;i<n;i++){
            if(i==0) cout<<'2';
            else if(i==1) cout<<'0';
            else if(i==2) cout<<'1';
            else if(i==3) cout<<'8';
            else cout<<s[i];
        }
        cout<<endl;
    }
    return 0;
}


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

#include<bits/stdc++.h>

using namespace std;

int main()
{
   char year_and_date[10];
   gets(year_and_date);
   if(year_and_date[3]=='7') year_and_date[3]='8';
   printf("%s\n",year_and_date);
   return 0;
}


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

#include<iostream>
using naespace std;
int main()
{
int N,Y;
cin>>N>>Y;
for(int i=0;i<=N;i++)
for(int j=i;j<=N;j++)
{
int sum=i*10000+j*1000+(j-i)*5000;
if(sum==Y)
{
cout<<i<<" "<<(j-i)<<" "<<(N-j);
system ("pause");
return 0;
}
}
cout<<"-1 -1 -1";
system ("pause");
return 0;
}

Compiler output:
a.cc:2:7: error: expected nested-name-specifier before 'naespace'
    2 | using naespace std;
      |       ^~~~~~~~
a.cc: In function 'int main()':
a.cc:6:1: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
    6 | cin>>N>>Y;
      | ^~~
      | 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:1: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   13 | cout<<i<<" "<<(j-i)<<" "<<(N-j);
      | ^~~~
      | std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
a.cc:18:1: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   18 | cout<<"-1 -1 -1";
      | ^~~~
      | std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
Language: C++

#include <iostream>
#include <string>

int main(){
	string str;
	cin >> str;
	str[3] = '8';
	cout << str;
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:5:9: error: 'string' was not declared in this scope
    5 |         string str;
      |         ^~~~~~
a.cc:5:9: note: suggested alternatives:
In file included from /usr/include/c++/14/iosfwd:41,
                 from /usr/include/c++/14/ios:40,
                 from /usr/include/c++/14/ostream:40,
                 from /usr/include/c++/14/iostream:41,
                 from a.cc:1:
/usr/include/c++/14/bits/stringfwd.h:77:33: note:   'std::string'
   77 |   typedef basic_string<char>    string;
      |                                 ^~~~~~
In file included from /usr/include/c++/14/bits/locale_classes.h:40,
                 from /usr/include/c++/14/bits/ios_base.h:41,
                 from /usr/include/c++/14/ios:44:
/usr/include/c++/14/string:76:11: note:   'std::pmr::string'
   76 |     using string    = basic_string<char>;
      |           ^~~~~~
a.cc:6:9: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
    6 |         cin >> str;
      |         ^~~
      |         std::cin
/usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here
   62 |   extern istream cin;           ///< Linked to standard input
      |                  ^~~
a.cc:6:16: error: 'str' was not declared in this scope; did you mean 'std'?
    6 |         cin >> str;
      |                ^~~
      |                std
a.cc:8:9: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
    8 |         cout << str;
      |         ^~~~
      |         std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
Language: C++

#include<stdio.h>
int main()
{
char S[10];
gets(S);
S[0]=2;
S[1]=0;
S[2]=1;
S[3]=8;
printf("%s",S);
return 0;
}

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

#include<stdio.h>
#include<string.h>
int main()
{
    char arr[11]; int a,b;
    gets(arr); arr[0]='2'; arr[1]='0'; arr[2]='1'; arr[3]='8';
    for(a=0;a<10;a++)
        printf("%c",arr[a]);
}


Compiler output:
a.cc: In function 'int main()':
a.cc:6:5: error: 'gets' was not declared in this scope; did you mean 'getw'?
    6 |     gets(arr); arr[0]='2'; arr[1]='0'; arr[2]='1'; arr[3]='8';
      |     ^~~~
      |     getw
Language: Java

import java.util.*;
public class MyClass {
    public static void main(String args[]) {
      Scanner in = new Scanner(System.in);
      String s = in.next();
      System.out.println("2018"+s.substring(4,s.length()));
    }
}


Compiler output:
Main.java:2: error: class MyClass is public, should be declared in a file named MyClass.java
public class MyClass {
       ^
1 error
Language: C++

import java.util.*;
public class MyClass {
    public static void main(String args[]) {
      Scanner in = new Scanner(System.in);
      String s = in.next();
      System.out.println("2018"+s.substring(4,s.length()));
    }
}


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 MyClass {
      | ^~~~~~
Language: C++

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

int main()
{
	int s;
	
	cin>>s;
	
	s[3]=8;
	
	cout<<s<<endl;
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:10: error: invalid types 'int[int]' for array subscript
   10 |         s[3]=8;
      |          ^
Language: C++

#include<iostream>
#include<string>
#include<cmath>
#include<queue>
#include<map>
#include<set>
#include<list>
#include<iomanip>
#include<vector>
#include<functional>
#include<algorithm>
#include<cstdio>
#include<random>
#include<unordered_map>
using namespace std;
//---------------------------------------------------
//ライブラリゾーン！！！！
#define int long long
#define str string
#define rep(i,j) for(int i=0;i<(int)(j);i++)
typedef long long ll;
typedef long double ld;
const ll inf = 4523372036854775807;
short gh[2][4] = { {0,0,-1,1},{-1,1,0,0} };
struct P {
ll pos, cost;
};
bool operator<(P a, P b) { return a.cost < b.cost; }
bool operator>(P a, P b) { return a.cost > b.cost; }
struct B {//隣接リスト表現
ll to, cost;
};
struct S {//辺の情報を入れる変数
int from, to, cost;
};
struct H {
int x, y;
};
bool operator<(H a, H b) {
if (a.x != b.x) return a.x < b.x;
return a.y < b.y;
}
ll gcm(ll i, ll j) {//最大公約数
if (i > j) swap(i, j);
if (i == 0) return j;
return gcm(j%i, i);
}
ld rad(ld a, ld b, ld c, ld d) {
return sqrt(pow(a - c, 2) + pow(b - d, 2));
}//rad＝座標上の2点間の距離
int ari(int a, int b, int c) {
return (a + b)*c / 2;
}//等差数列の和
bool suf(ld a, ld b, ld c, ld d) {
if (b <= c || d <= a) return 0;
return 1;
}//[a,b),[c,d)
//---------------------------------------------------
//+++++++++++++++++++++++++++++++++++++++++++++++++++
signed main() {
	sring s;
	cin>>s;
	s[3]='8';
	cout<<s<<endl;
	getchar(); getchar();
}


Compiler output:
a.cc: In function 'int main()':
a.cc:61:9: error: 'sring' was not declared in this scope
   61 |         sring s;
      |         ^~~~~
a.cc:62:14: error: 's' was not declared in this scope
   62 |         cin>>s;
      |              ^
Language: C

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

int main()
{
    char string[10];
    scanf("%s",string);
    char modified[10];
    modified[0]='2';
    modified[1]='0';
    modified[2]='1';
    modified[3]='8';
    for(i=4;i<strlen(string);i++)
    {
        modified[i]=string[i];
    }
    printf("%s",modified);
    return 0;
}

Compiler output:
main.c: In function 'main':
main.c:13:9: error: 'i' undeclared (first use in this function)
   13 |     for(i=4;i<strlen(string);i++)
      |         ^
main.c:13:9: note: each undeclared identifier is reported only once for each function it appears in
Language: C++

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

int main()
{
    char string[10];
    scanf("%s",string);
    char modified[10];
    modified[0]='2';
    modified[1]='0';
    modified[2]='1';
    modified[3]='8';
    for(i=4;i<strlen(string);i++)
    {
        modified[i]=string[i];
    }
    printf("%s",modified);
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:13:9: error: 'i' was not declared in this scope
   13 |     for(i=4;i<strlen(string);i++)
      |         ^
Language: C++

#include<iostream>
#include<string>
using namespace std;
int main(){
int main(){
string S;
cin >> S;
S[3] = '8';
cout << S << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:5:9: warning: empty parentheses were disambiguated as a function declaration [-Wvexing-parse]
    5 | int main(){
      |         ^~
a.cc:5:9: note: remove parentheses to default-initialize a variable
    5 | int main(){
      |         ^~
      |         --
a.cc:5:9: note: or replace parentheses with braces to value-initialize a variable
a.cc:5:11: error: a function-definition is not allowed here before '{' token
    5 | int main(){
      |           ^
a.cc:10:2: error: expected '}' at end of input
   10 | }
      |  ^
a.cc:4:11: note: to match this '{'
    4 | int main(){
      |           ^
Language: C++

#include<iostream>
#include<string>
using namespace std;
int main(){
	string s;
	cin>>s;
	s[3]='8'
	cout<<s<<endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:17: error: expected ';' before 'cout'
    7 |         s[3]='8'
      |                 ^
      |                 ;
    8 |         cout<<s<<endl;
      |         ~~~~
Language: C++

#include<iostream>
#include<string>
using namespace std;
int main(){
	string s;
	a=s[3]-'0';
	cin>>s;
	if(a==7){
		a==8;
	}
	cout<<s<<endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:9: error: 'a' was not declared in this scope
    6 |         a=s[3]-'0';
      |         ^
Language: C++

#include<iostream>
#include<string>
using namespace std;
int main(){
	string s;
	a=s[4]-'4';
	cin>>s;
	if(a==7){
		a==8;
	}
	cout<<s<<endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:9: error: 'a' was not declared in this scope
    6 |         a=s[4]-'4';
      |         ^
Language: Java

import java.util.Scanner;

public class Already {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		String date = sc.next();
		Scanner a = new Scanner(date).useDelimiter("/");
		int i = 0;
		String[] list = new String[3];
		while(a.hasNext()) {
			list[i] = a.next();
			i++;
		}
		if(!list[0].equals("2018"))
			list[0] = "2018";
		System.out.println(list[0] + "/"+list[1] +"/"+list[2]);
		
	}
}


Compiler output:
Main.java:3: error: class Already is public, should be declared in a file named Already.java
public class Already {
       ^
1 error
Language: Java

import java.util.Scanner;

public class Exam1 {
	public static void main(String[] args) {
		Scanner scanner = new Scanner(System.in);
		
		String str;
		
		str = scanner.next();
		
		char charValue = str.charAt(3);
		
		if(charValue == '7') {
			charValue = '8';
		}
		
		String oldStr = str;
		String newStr = oldStr.replace(str.charAt(3), '8');
		System.out.println(newStr);
	}

}


Compiler output:
Main.java:3: error: class Exam1 is public, should be declared in a file named Exam1.java
public class Exam1 {
       ^
1 error
Language: Java

import java.util.Scanner;

public class Already2018 {
	public static void main(String[] args)
	{
		Scanner scanner = new Scanner(System.in);
		String s = scanner.next();
		String determin = s.substring(0,4);

		if(determin.equals("2017"))
		{
			s = s.replace("2017","2018");
		}
		System.out.println(s);
	}	
}


Compiler output:
Main.java:3: error: class Already2018 is public, should be declared in a file named Already2018.java
public class Already2018 {
       ^
1 error
Language: Java

import java.util.Scanner;
 
public classMain {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		String s = sc.next();
		s = "2018/01/23";
		System.out.println(s);
		
		
	}
}

Compiler output:
Main.java:3: error: class, interface, enum, or record expected
public classMain {
       ^
Main.java:4: error: unnamed classes are a preview feature and are disabled by default.
	public static void main(String[] args) {
	              ^
  (use --enable-preview to enable unnamed classes)
Main.java:12: error: class, interface, enum, or record expected
}
^
3 errors
Language: Java


	public static void main(String[] args)
	{
		Scanner scanner = new Scanner(System.in);
		String s = scanner.next();
		String determin = s.substring(0,4);

		if(determin.equals("2017"))
		{
			s = s.replace("2017","2018");
		}
		System.out.println(s);
	}	



Compiler output:
Main.java:2: error: unnamed classes are a preview feature and are disabled by default.
	public static void main(String[] args)
	              ^
  (use --enable-preview to enable unnamed classes)
1 error
Language: Java

public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		String s = sc.next();
		s = "2018/01/23";
		System.out.println(s);
		
		
	}

Compiler output:
Main.java:1: error: unnamed classes are a preview feature and are disabled by default.
public static void main(String[] args) {
              ^
  (use --enable-preview to enable unnamed classes)
1 error
Language: Java

import java.util.Scanner;

public class A-Already {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		String s = sc.next();
		s = "2018/01/23";
		System.out.println(s);
		
		
	}
}

Compiler output:
Main.java:3: error: '{' expected
public class A-Already {
              ^
1 error
Language: Java

import java.util.Scanner;

public class Ex {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		String s = sc.next();
		s = "2018/01/23";
		System.out.println(s);
		
		
	}
}

Compiler output:
Main.java:3: error: class Ex is public, should be declared in a file named Ex.java
public class Ex {
       ^
1 error
Language: Java

import java.util.Scanner;

public class A {
	public static void main(String[] args)
	{
		Scanner scanner = new Scanner(System.in);
		String s = scanner.next();
		String determin = s.substring(0,4);

		if(determin.equals("2017"))
		{
			s = s.replace("2017","2018");
		}
		
		System.out.println(s);
	}	
}


Compiler output:
Main.java:3: error: class A is public, should be declared in a file named A.java
public class A {
       ^
1 error
Language: Java

import java.util.Scanner;

public class Already2018 {
	public static void main(String[] args)
	{
		Scanner scanner = new Scanner(System.in);
		String s = scanner.next();
		String determin = s.substring(0,4);

		if(determin.equals("2017"))
		{
			s = s.replace("2017","2018");
		}
		
		System.out.println(s);
	}	
}


Compiler output:
Main.java:3: error: class Already2018 is public, should be declared in a file named Already2018.java
public class Already2018 {
       ^
1 error
Language: C++

#include<iostream>
using namespace std;
string s;
int main(){
 cin>>s;
s[3] = '8';
count<<s;
return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:1: error: 'count' was not declared in this scope
    7 | count<<s;
      | ^~~~~
Language: Java

#include <iostream>
using namespace std;
string s;
int main() {
cin>>s;
s[3] ='8';
cout<<s;
return 0;
}


Compiler output:
Main.java:1: error: illegal character: '#'
#include <iostream>
^
Main.java:1: error: class, interface, enum, or record expected
#include <iostream>
         ^
Main.java:3: error: unnamed classes are a preview feature and are disabled by default.
string s;
^
  (use --enable-preview to enable unnamed classes)
Main.java:5: error: not a statement
cin>>s;
   ^
Main.java:7: error: not a statement
cout<<s;
    ^
5 errors
Language: Java

import java.util.Scanner;

public class Already2018 {
	public static void main(String[] args)
	{
		Scanner scanner = new Scanner(System.in);
		String s = scanner.next();
		String determin = s.substring(0,3);

		if(determin =="2017")
		{
			s = s.replace("2017","2018");
		}
	}	
}

Compiler output:
Main.java:3: error: class Already2018 is public, should be declared in a file named Already2018.java
public class Already2018 {
       ^
1 error
Language: C++

//
//  main.cpp
//  a
//
//  Created by h3037153 on 2018/01/15.
//  Copyright © 2018年 h3037153. All rights reserved.
//

#include<iostream>
#include<string>
using namespace std;
int main(){
    string s;
    cin>>s;
    s[3]='8';
    cout<<s<<endl;
    return 0;
}c

Compiler output:
a.cc:18:2: error: 'c' does not name a type
   18 | }c
      |  ^
Language: C++

#include<iostream>
using namespace std;
string s;
int main(){
cin>>s;
s[3] = '8';
cout<<s
return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:8: error: expected ';' before 'return'
    7 | cout<<s
      |        ^
      |        ;
    8 | return 0;
      | ~~~~~~
Language: C++

string s;
int main(){ 
cin>>s;
s[3]='8';
cout << s; 
   
   return 0;

Compiler output:
a.cc:1:1: error: 'string' does not name a type
    1 | string s;
      | ^~~~~~
a.cc: In function 'int main()':
a.cc:3:1: error: 'cin' was not declared in this scope
    3 | cin>>s;
      | ^~~
a.cc:3:6: error: 's' was not declared in this scope
    3 | cin>>s;
      |      ^
a.cc:5:1: error: 'cout' was not declared in this scope
    5 | cout << s;
      | ^~~~
a.cc:7:13: error: expected '}' at end of input
    7 |    return 0;
      |             ^
a.cc:2:11: note: to match this '{'
    2 | int main(){
      |           ^
Language: Java

public static void main(String[] args) {

		String s = "2017/01/";
		Scanner scanner = new Scanner(System.in);
		s= scanner.next();
		String st = "2018/01/";
		System.out.println(st+s.substring(8));
		scanner.close();
	}

Compiler output:
Main.java:1: error: unnamed classes are a preview feature and are disabled by default.
public static void main(String[] args) {
              ^
  (use --enable-preview to enable unnamed classes)
1 error
Language: Java

import java.util.*;


public class HelloWorld{

     public static void main(String []args){
        String S , A;
        Scanner sc = new Scanner(System.in);
        S = sc.nextLine();
        A = S.substring(0,4);
        if(A.equals("2018") == false){
           S = S.replace(A, "2018");
        } 
        System.out.println(S);
     }
}

Compiler output:
Main.java:4: error: class HelloWorld is public, should be declared in a file named HelloWorld.java
public class HelloWorld{
       ^
1 error
Language: Java

import java.util.*;

public class main {
	public static void main(String[] args) {
		System.out.println("Hi");
		String s = "2017/01/00";
		Scanner scanner = new Scanner(System.in);
		s= scanner.next();
		String st = "2018/01/";
		
		System.out.println(st+s.substring(8));
		scanner.close();
	}

}

Compiler output:
Main.java:3: error: class main is public, should be declared in a file named main.java
public class main {
       ^
1 error
Language: Java

import java.util.*;


     public static void main(String []args){
        String S , A;
        Scanner sc = new Scanner(System.in);
        S = sc.nextLine();
        A = S.substring(0,4);
        if(A.equals("2018") == false){
           S = S.replace(A, "2018");
        } 
        System.out.println(S);
     }


Compiler output:
Main.java:4: error: unnamed classes are a preview feature and are disabled by default.
     public static void main(String []args){
                   ^
  (use --enable-preview to enable unnamed classes)
1 error
Language: C++

#include <iostream>
using namespace std;
string s;
int main() {
  cin>>s;
  s[3]='8';
  cout<<s;
  return s;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:10: error: cannot convert 'std::string' {aka 'std::__cxx11::basic_string<char>'} to 'int' in return
    8 |   return s;
      |          ^
      |          |
      |          std::string {aka std::__cxx11::basic_string<char>}
Language: C++

#include <iostream>

using namespace std;

int main()
{
    cin>>s;
    s[3]='8';
   cout << s 
   
   return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:10: error: 's' was not declared in this scope
    7 |     cin>>s;
      |          ^
Language: C++

#include <stdio.h>
using namaspace s

int main(void){
  char s[2];
  scanf("2017/01/%s", s);
  
  printf("2018/01/%s", s);
}

Compiler output:
a.cc:2:7: error: expected nested-name-specifier before 'namaspace'
    2 | using namaspace s
      |       ^~~~~~~~~
Language: C++

#include <stdio.h>

int main(void){
  string s;
  scanf("2017/01/%s", s);
  
  printf("2018/01/%s", s);
}

Compiler output:
a.cc: In function 'int main()':
a.cc:4:3: error: 'string' was not declared in this scope; did you mean 'stdin'?
    4 |   string s;
      |   ^~~~~~
      |   stdin
a.cc:5:23: error: 's' was not declared in this scope
    5 |   scanf("2017/01/%s", s);
      |                       ^
Language: C++

#include<bitts/stdc++.h>
using namespace std;
int mochi[101];
int main()
{
	int ans,i,n;
	scanf("%d",&n);
	for(i=0;i<n;i++)
		scanf("%d",&mochi[i]);
	sort(mochi+0,mochi+n);
	ans=unique(mochi,mochi+n)-mochi;
	printf("%d",ans);
	return 0;
}

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

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

int main()
{
  string s;
  
  cin >> s;
  
  cout << "2018"+s.subter(4);
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:20: error: 'std::string' {aka 'class std::__cxx11::basic_string<char>'} has no member named 'subter'; did you mean 'substr'?
   10 |   cout << "2018"+s.subter(4);
      |                    ^~~~~~
      |                    substr
Language: C++

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

int main()
{
  string s;
  
  cin >> s;
  
  cout << "2018"+s.subter(4)
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:20: error: 'std::string' {aka 'class std::__cxx11::basic_string<char>'} has no member named 'subter'; did you mean 'substr'?
   10 |   cout << "2018"+s.subter(4)
      |                    ^~~~~~
      |                    substr
Language: C++

char S[20];
	cin >> S;
	S[3] = '8';
	cout << S;
	return 0;

Compiler output:
a.cc:2:9: error: 'cin' does not name a type
    2 |         cin >> S;
      |         ^~~
a.cc:3:9: error: 'S' does not name a type
    3 |         S[3] = '8';
      |         ^
a.cc:4:9: error: 'cout' does not name a type
    4 |         cout << S;
      |         ^~~~
a.cc:5:9: error: expected unqualified-id before 'return'
    5 |         return 0;
      |         ^~~~~~
Language: C++

#include<iostream>
#include<cstdio>
#include<cstring>
#include<string.h>
using namespace std;
char s[1005];
int main(){
	gets(s);
	printf("2018");
	for(int i=4;i<strlen(s);i++) printf("%c",s[i]);
	printf("\n");
	return 0;
}

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

#include<bits/stdc++.h>
using namespace std;
char s[1005];
int main(){
	gets(s);
	printf("2018");
	for(int i=4;i<strlen(s);i++) printf("%c",s[i]);
	printf("\n");
	return 0;
}

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

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

int main() {
 cin >> s;
s[3] = '8';
count << s;
return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:8:1: error: 'count' was not declared in this scope
    8 | count << s;
      | ^~~~~
Language: C++

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

int main() {
 cin >> s;
s[3] = '8';
count << a;
return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:8:1: error: 'count' was not declared in this scope
    8 | count << a;
      | ^~~~~
a.cc:8:10: error: 'a' was not declared in this scope
    8 | count << a;
      |          ^
Language: C++

#incluede<iostream>
using namespace std;
string s;
int main() {
cin>>s;
s[3]='8';
cout<<s;
return 0;
}

Compiler output:
a.cc:1:2: error: invalid preprocessing directive #incluede; did you mean #include?
    1 | #incluede<iostream>
      |  ^~~~~~~~
      |  include
a.cc:3:1: error: 'string' does not name a type
    3 | string s;
      | ^~~~~~
a.cc: In function 'int main()':
a.cc:5:1: error: 'cin' was not declared in this scope
    5 | cin>>s;
      | ^~~
a.cc:1:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
  +++ |+#include <iostream>
    1 | #incluede<iostream>
a.cc:5:6: error: 's' was not declared in this scope
    5 | cin>>s;
      |      ^
a.cc:7:1: error: 'cout' was not declared in this scope
    7 | cout<<s;
      | ^~~~
a.cc:7:1: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
Language: C++

#inclue<iostream>
using namespace std;
String s;
int main(){
cin>>s;
s[3]='8';
cout<<s;
return 0;
}

Compiler output:
a.cc:1:2: error: invalid preprocessing directive #inclue; did you mean #include?
    1 | #inclue<iostream>
      |  ^~~~~~
      |  include
a.cc:3:1: error: 'String' does not name a type
    3 | String s;
      | ^~~~~~
a.cc: In function 'int main()':
a.cc:5:1: error: 'cin' was not declared in this scope
    5 | cin>>s;
      | ^~~
a.cc:1:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
  +++ |+#include <iostream>
    1 | #inclue<iostream>
a.cc:5:6: error: 's' was not declared in this scope
    5 | cin>>s;
      |      ^
a.cc:7:1: error: 'cout' was not declared in this scope
    7 | cout<<s;
      | ^~~~
a.cc:7:1: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
Language: C++

#inclue<iostream>
using namespace std;
string s;
int main(){
cin>>5;
s[3]='S';
cout<<s;
return 0;
}

Compiler output:
a.cc:1:2: error: invalid preprocessing directive #inclue; did you mean #include?
    1 | #inclue<iostream>
      |  ^~~~~~
      |  include
a.cc:3:1: error: 'string' does not name a type
    3 | string s;
      | ^~~~~~
a.cc: In function 'int main()':
a.cc:5:1: error: 'cin' was not declared in this scope
    5 | cin>>5;
      | ^~~
a.cc:1:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
  +++ |+#include <iostream>
    1 | #inclue<iostream>
a.cc:6:1: error: 's' was not declared in this scope
    6 | s[3]='S';
      | ^
a.cc:7:1: error: 'cout' was not declared in this scope
    7 | cout<<s;
      | ^~~~
a.cc:7:1: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
Language: C++

#include<iostream>
using namespace std;
strings;
int main() {
cin>>s;
s[3] = 's';
cout<<s;
return 0;
}

Compiler output:
a.cc:3:1: error: 'strings' does not name a type; did you mean 'stdin'?
    3 | strings;
      | ^~~~~~~
      | stdin
a.cc: In function 'int main()':
a.cc:5:6: error: 's' was not declared in this scope
    5 | cin>>s;
      |      ^
Language: C++

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

int main() {
 cin >> a;
s[j] = '8';
count << a;
return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:6:9: error: 'a' was not declared in this scope
    6 |  cin >> a;
      |         ^
a.cc:7:3: error: 'j' was not declared in this scope
    7 | s[j] = '8';
      |   ^
a.cc:8:1: error: 'count' was not declared in this scope
    8 | count << a;
      | ^~~~~
Language: C++

#include <iostream>
#include <string>
using namespace std;
int main()
{
	string date;
	cin >> date;
	replace(3, 1, "8");
	cout << date << endl;
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:9: error: 'replace' was not declared in this scope
    8 |         replace(3, 1, "8");
      |         ^~~~~~~
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main(){
  string s;
  cin>>s;
  s[3]="8";
  cout<<s<<endl;
  return 0;	
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:8: error: invalid conversion from 'const char*' to '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type' {aka 'char'} [-fpermissive]
    6 |   s[3]="8";
      |        ^~~
      |        |
      |        const char*
Language: C++

#include<bits/stdc++>
using namespace std;
int main(){
  string s;
  cin>>s;
  s[3]="8";
  cout<<s<<endl;
  return 0;	
}

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

#include<bits/stdc++.h>
main(){string S;std::cin>>S;S[3]=56;printf("%s\n",S);}

Compiler output:
a.cc:2:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
    2 | main(){string S;std::cin>>S;S[3]=56;printf("%s\n",S);}
      | ^~~~
a.cc: In function 'int main()':
a.cc:2:8: error: 'string' was not declared in this scope
    2 | main(){string S;std::cin>>S;S[3]=56;printf("%s\n",S);}
      |        ^~~~~~
a.cc:2:8: note: suggested alternatives:
In file included from /usr/include/c++/14/string:41,
                 from /usr/include/c++/14/bitset:52,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:52,
                 from a.cc:1:
/usr/include/c++/14/bits/stringfwd.h:77:33: note:   'std::string'
   77 |   typedef basic_string<char>    string;
      |                                 ^~~~~~
/usr/include/c++/14/string:76:11: note:   'std::pmr::string'
   76 |     using string    = basic_string<char>;
      |           ^~~~~~
a.cc:2:27: error: 'S' was not declared in this scope
    2 | main(){string S;std::cin>>S;S[3]=56;printf("%s\n",S);}
      |                           ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
int main()
{
	string s;
	cin>>s;
	cout<<"2018"+substr(4);
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:22: error: 'substr' was not declared in this scope; did you mean 'strstr'?
    7 |         cout<<"2018"+substr(4);
      |                      ^~~~~~
      |                      strstr
Language: C++

S = input()
s = S.replace('2017','2018')
print(s)

Compiler output:
a.cc:2:15: warning: multi-character character constant [-Wmultichar]
    2 | s = S.replace('2017','2018')
      |               ^~~~~~
a.cc:2:22: warning: multi-character character constant [-Wmultichar]
    2 | s = S.replace('2017','2018')
      |                      ^~~~~~
a.cc:1:1: error: 'S' does not name a type
    1 | S = input()
      | ^
Language: C++

#include <iostream>
uisng namespace std;
int main(){
	char c[10]={0};
	for (int A=0;A<10;A++) cin>>c[A];
	for (int A=0;A<4;A++){
		if (A==0) c[A]=2;
		if (A==1) c[A]=0;
		if (A==2) c[A]=1;
		if (A==3) c[A]=8;
	for (int A=0;a<10;A++) cout<<c[A];
	cout<<endl;
	return 0;
}


Compiler output:
a.cc:2:1: error: 'uisng' does not name a type
    2 | uisng namespace std;
      | ^~~~~
a.cc: In function 'int main()':
a.cc:5:32: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
    5 |         for (int A=0;A<10;A++) cin>>c[A];
      |                                ^~~
      |                                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:11:22: error: 'a' was not declared in this scope
   11 |         for (int A=0;a<10;A++) cout<<c[A];
      |                      ^
a.cc:11:32: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   11 |         for (int A=0;a<10;A++) cout<<c[A];
      |                                ^~~~
      |                                std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
a.cc:12:9: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   12 |         cout<<endl;
      |         ^~~~
      |         std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
a.cc:12:15: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
   12 |         cout<<endl;
      |               ^~~~
      |               std::endl
In file included from /usr/include/c++/14/iostream:41:
/usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here
  744 |     endl(basic_ostream<_CharT, _Traits>& __os)
      |     ^~~~
a.cc:14:2: error: expected '}' at end of input
   14 | }
      |  ^
a.cc:3:11: note: to match this '{'
    3 | int main(){
      |           ^
Language: C++

{-# LANGUAGE ScopedTypeVariables #-}
{-# LANGUAGE BangPatterns #-}

import Control.Applicative
import Control.Monad
import Control.Arrow
import Data.List
import Data.Maybe
import Data.Char
import qualified Data.ByteString.Char8 as B
import Text.Printf

readInt = ( readLn :: IO Int )
readInts = map ( read :: String -> Int ) . words <$> getLine

getList = map ( fst . fromJust . B.readInt ) . B.words <$> B.getLine

which a b f = if f then a else b
mp [ a, b ] = ( a, b )

main = getLine >>= putStrLn . ( "2018" ++ ) . drop 4


Compiler output:
a.cc:1:3: error: stray '#' in program
    1 | {-# LANGUAGE ScopedTypeVariables #-}
      |   ^
a.cc:1:34: error: stray '#' in program
    1 | {-# LANGUAGE ScopedTypeVariables #-}
      |                                  ^
a.cc:2:3: error: stray '#' in program
    2 | {-# LANGUAGE BangPatterns #-}
      |   ^
a.cc:2:27: error: stray '#' in program
    2 | {-# LANGUAGE BangPatterns #-}
      |                           ^
a.cc:1:1: error: expected unqualified-id before '{' token
    1 | {-# LANGUAGE ScopedTypeVariables #-}
      | ^
a.cc:2:1: error: expected unqualified-id before '{' token
    2 | {-# LANGUAGE BangPatterns #-}
      | ^
a.cc:4:1: error: 'import' does not name a type
    4 | import Control.Applicative
      | ^~~~~~
a.cc:4:1: note: C++20 'import' only available with '-fmodules-ts'
Language: C++

str = STDIN.gets
puts '2018' + str[4..-1]

Compiler output:
a.cc:2:6: warning: multi-character character constant [-Wmultichar]
    2 | puts '2018' + str[4..-1]
      |      ^~~~~~
a.cc:2:19: error: too many decimal points in number
    2 | puts '2018' + str[4..-1]
      |                   ^~~
a.cc:1:1: error: 'str' does not name a type
    1 | str = STDIN.gets
      | ^~~
Language: Java

import java.util.Scanner;

public class Main {
  public static void main(String[] args) {
    Scanner sc = new Scanner(system.in);
    String a = sc.nextLine();
    String ans = a.replace("2017","2018");
    System.out.println(ans);
  }

}


Compiler output:
Main.java:5: error: cannot find symbol
    Scanner sc = new Scanner(system.in);
                             ^
  symbol:   variable system
  location: class Main
1 error
Language: Java

import java.util.Scanner;

public class Main {
  public static String main(String[] args) {
    Scanner sc = new Scanner(system.in);
    String a = sc.nextLine();
    String ans = a.replace("2017","2018");
    system.out.println(ans);
  }

}


Compiler output:
Main.java:5: error: cannot find symbol
    Scanner sc = new Scanner(system.in);
                             ^
  symbol:   variable system
  location: class Main
Main.java:8: error: package system does not exist
    system.out.println(ans);
          ^
2 errors
Language: Java

import java.util.Scanner;

public class Main {
  public static String main(String[] args) {
    Scanner sc = new Scanner(system.in);
    String a = sc.nextLine();
    String ans = a.replace("2017","2018");
    return  ans;
  }

}


Compiler output:
Main.java:5: error: cannot find symbol
    Scanner sc = new Scanner(system.in);
                             ^
  symbol:   variable system
  location: class Main
1 error
Language: Java

public class Main {
  public static String main(String[] args) {
    Scanner sc = new Scanner(system.in);
    String a = sc.next();
    String ans = a.replace("2017","2018");
    return  ans;
  }

}


Compiler output:
Main.java:3: error: cannot find symbol
    Scanner sc = new Scanner(system.in);
    ^
  symbol:   class Scanner
  location: class Main
Main.java:3: error: cannot find symbol
    Scanner sc = new Scanner(system.in);
                     ^
  symbol:   class Scanner
  location: class Main
Main.java:3: error: cannot find symbol
    Scanner sc = new Scanner(system.in);
                             ^
  symbol:   variable system
  location: class Main
3 errors
Language: Java

import java.util.Scanner;

public class Main {
  public static String main(String[] args) {
    Scanner sc = new Scanner(system.in);
    String a = sc.next();
    String ans = a.replace("2017","2018");
    return  ans;
  }

}


Compiler output:
Main.java:5: error: cannot find symbol
    Scanner sc = new Scanner(system.in);
                             ^
  symbol:   variable system
  location: class Main
1 error
Language: Java

import java.util.Scanner;

public class main {
  public static String main(String[] args) {
    Scanner sc = new Scanner(system.in);
    String a = sc.next();
    String ans = a.replace("2017","2018");
    return  ans;
  }

}


Compiler output:
Main.java:3: error: class main is public, should be declared in a file named main.java
public class main {
       ^
Main.java:5: error: cannot find symbol
    Scanner sc = new Scanner(system.in);
                             ^
  symbol:   variable system
  location: class main
2 errors
Language: C++

#include <bits/stdc++.h>
#define rep(i, a, n) for(int i = a; i < n; i++)
#define REP(i, n) rep(i, 0, n)
#define repb(i, a, b) for(int i = a; i >= b; i--)
#define all(a) a.begin(), a.end()
#define int long long
#define chmax(x, y) x = max(x, y)
#define chmin(x, y) x = min(x, y)
using namespace std;
typedef pair<int, int> P;
const int mod = 1000000007;
const int INF = 1e12;
 
signed main(){
    ios::sync_with_stdio(false);
    cin.tie(0);
    int n, m, l, a, b, c, d, ans = 0;
    string s, t, r;

Compiler output:
a.cc: In function 'int main()':
a.cc:18:20: error: expected '}' at end of input
   18 |     string s, t, r;
      |                    ^
a.cc:14:14: note: to match this '{'
   14 | signed main(){
      |              ^
Language: C++

#include<iostream>
#include<vector>
#include<queue>

using namespace std;

int main(void){
	string s;
	cin >>s;
	s[3] ='8';
	cout << s <<endl;
	return0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:12:9: error: 'return0' was not declared in this scope
   12 |         return0;
      |         ^~~~~~~
Language: C++

#include <iostream>
#include <string>
#include <algorithm>
#include <functional>
#include <vector>
#include <stack>
#include <queue>
#include <set>
#include <map>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <cmath>
#define rep(i, n) for (i = 0; i < n; i++)
using namespace std;

signed main() {
	cin >> s;
	s[3] = '8';
	cout << s << endl;
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:18:16: error: 's' was not declared in this scope
   18 |         cin >> s;
      |                ^
Language: Java

import java.util.*;

public class Solver {
	public static void main(String[] args) {
		Scanner in = new Scanner(System.in);
		String str = in.nextLine();
		char[] array = str.toCharArray();
		array[3] = '8';
		System.out.println(array);
	}

}

Compiler output:
Main.java:3: error: class Solver is public, should be declared in a file named Solver.java
public class Solver {
       ^
1 error
Language: C++

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

string S;

int main(){
	cin >> S
	S[3] = '8';
	cout << S << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:17: error: expected ';' before 'S'
    8 |         cin >> S
      |                 ^
      |                 ;
    9 |         S[3] = '8';
      |         ~
Language: C++

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

int main()
  ｛string s;
cin>>s;
s[3] ='8';
cout<<s<<endl;
return 0;
｝

Compiler output:
a.cc:6:3: error: expected initializer before '\U0000ff5bstring'
    6 |   ｛string s;
      |   ^~~~~~~~
a.cc:7:1: error: 'cin' does not name a type
    7 | cin>>s;
      | ^~~
a.cc:8:1: error: 's' does not name a type
    8 | s[3] ='8';
      | ^
a.cc:9:1: error: 'cout' does not name a type
    9 | cout<<s<<endl;
      | ^~~~
a.cc:10:1: error: expected unqualified-id before 'return'
   10 | return 0;
      | ^~~~~~
a.cc:11:1: error: '\U0000ff5d' does not name a type
   11 | ｝
      | ^~
Language: C++

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

int main()
  ｛string s;
cin>>s;
s[3] ='8';
cout<<s<<endl;
return 0;
｝

Compiler output:
a.cc:3:7: error: expected nested-name-specifier before 'nanespace'
    3 | using nanespace std;
      |       ^~~~~~~~~
a.cc:6:3: error: expected initializer before '\U0000ff5bstring'
    6 |   ｛string s;
      |   ^~~~~~~~
a.cc:7:1: error: 'cin' does not name a type
    7 | cin>>s;
      | ^~~
a.cc:8:1: error: 's' does not name a type
    8 | s[3] ='8';
      | ^
a.cc:9:1: error: 'cout' does not name a type
    9 | cout<<s<<endl;
      | ^~~~
a.cc:10:1: error: expected unqualified-id before 'return'
   10 | return 0;
      | ^~~~~~
a.cc:11:1: error: '\U0000ff5d' does not name a type
   11 | ｝
      | ^~
Language: C++

#include <iostream>
using namespace std;

int main()
  ｛string s;
cin>>s;
s[3] ='8';
cout<<s<<endl;
return 0;
｝

Compiler output:
a.cc:5:3: error: expected initializer before '\U0000ff5bstring'
    5 |   ｛string s;
      |   ^~~~~~~~
a.cc:6:1: error: 'cin' does not name a type
    6 | cin>>s;
      | ^~~
a.cc:7:1: error: 's' does not name a type
    7 | s[3] ='8';
      | ^
a.cc:8:1: error: 'cout' does not name a type
    8 | cout<<s<<endl;
      | ^~~~
a.cc:9:1: error: expected unqualified-id before 'return'
    9 | return 0;
      | ^~~~~~
a.cc:10:1: error: '\U0000ff5d' does not name a type
   10 | ｝
      | ^~
Language: C++

#include <iostream>
using nanespace std;

int main()
  ｛string s;
cin>>s;
s[3] ='8';
cout<<s<<endl;
return 0;
｝

Compiler output:
a.cc:2:7: error: expected nested-name-specifier before 'nanespace'
    2 | using nanespace std;
      |       ^~~~~~~~~
a.cc:5:3: error: expected initializer before '\U0000ff5bstring'
    5 |   ｛string s;
      |   ^~~~~~~~
a.cc:6:1: error: 'cin' does not name a type
    6 | cin>>s;
      | ^~~
a.cc:7:1: error: 's' does not name a type
    7 | s[3] ='8';
      | ^
a.cc:8:1: error: 'cout' does not name a type
    8 | cout<<s<<endl;
      | ^~~~
a.cc:9:1: error: expected unqualified-id before 'return'
    9 | return 0;
      | ^~~~~~
a.cc:10:1: error: '\U0000ff5d' does not name a type
   10 | ｝
      | ^~
Language: Java

import java.util.*;
public class Main {
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
                String datestr = (StringBuffer)sc.next();
                datestr.replace(1,4,"2018");
		System.out.println(datestr);
	}
}


Compiler output:
Main.java:5: error: incompatible types: String cannot be converted to StringBuffer
                String datestr = (StringBuffer)sc.next();
                                                      ^
Main.java:6: error: no suitable method found for replace(int,int,String)
                datestr.replace(1,4,"2018");
                       ^
    method String.replace(char,char) is not applicable
      (actual and formal argument lists differ in length)
    method String.replace(CharSequence,CharSequence) is not applicable
      (actual and formal argument lists differ in length)
2 errors
Language: C++

#include <bits/stdc++.h>  

using namespace std;

#define int long long
#define FOR(i, j, k) for(int i = j; i < k; ++i)
#define rep(i, j) FOR(i, 0, j)
#define INF 1e9
#define LINF 1e18

typedef unsigned long long ull;
typedef pair<int, int> P;
typedef pair<P, int> Pi;
typedef pair<P, P> PP;

const int MOD = 1e9 + 7;
const int dy[]={0, 0, 1, -1};
const int dx[]={1, -1, 0, 0};

template <class T> void chmin(T& a, const T& b) { a = min(a, b); }
template <class T> void chmax(T& a, const T& b) { a = max(a, b); }

signed main() {
    cin.tie(0);
    ios::sync_with_stdio(false);

    cin >> s;
    s[3] = '8';
    cout << s << endl;
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:27:12: error: 's' was not declared in this scope
   27 |     cin >> s;
      |            ^
Language: Java

import java.util.*;
public class Main {
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
                String str = sc.next();
                StringBuffer datestr = str; 
                datestr.replace(1,4,"2018");
		System.out.println(datestr);
	}
}

Compiler output:
Main.java:6: error: incompatible types: String cannot be converted to StringBuffer
                StringBuffer datestr = str; 
                                       ^
1 error