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

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace ABC073A
{
    class Program
    {
        static void Main(string[] args)
        {
            String n;

            n = Console.ReadLine();

            if (n[0] == '9' || n[1] == '9')
                Console.WriteLine("Yes");

            else
                Console.WriteLine("No");

            Console.ReadKey();

        }
    }
}


Compiler output:
a.cc:1:7: error: expected nested-name-specifier before 'System'
    1 | using System;
      |       ^~~~~~
a.cc:2:7: error: expected nested-name-specifier before 'System'
    2 | using System.Collections.Generic;
      |       ^~~~~~
a.cc:3:7: error: expected nested-name-specifier before 'System'
    3 | using System.Linq;
      |       ^~~~~~
a.cc:4:7: error: expected nested-name-specifier before 'System'
    4 | using System.Text;
      |       ^~~~~~
a.cc:5:7: error: expected nested-name-specifier before 'System'
    5 | using System.Threading.Tasks;
      |       ^~~~~~
a.cc:11:26: error: 'string' has not been declared
   11 |         static void Main(string[] args)
      |                          ^~~~~~
a.cc:11:35: error: expected ',' or '...' before 'args'
   11 |         static void Main(string[] args)
      |                                   ^~~~
a.cc:26:6: error: expected ';' after class definition
   26 |     }
      |      ^
      |      ;
a.cc: In static member function 'static void ABC073A::Program::Main(int*)':
a.cc:13:13: error: 'String' was not declared in this scope
   13 |             String n;
      |             ^~~~~~
a.cc:15:13: error: 'n' was not declared in this scope
   15 |             n = Console.ReadLine();
      |             ^
a.cc:15:17: error: 'Console' was not declared in this scope
   15 |             n = Console.ReadLine();
      |                 ^~~~~~~
Language: C

#include <stdio.h>
int main(void){
  s[100];
  scanf("%s",s);
  s[3]='8';
  printf("%s\n",s);
  return 0;
}

Compiler output:
main.c: In function 'main':
main.c:3:3: error: 's' undeclared (first use in this function)
    3 |   s[100];
      |   ^
main.c:3:3: note: each undeclared identifier is reported only once for each function it appears in
Language: C++

#include <bits/stdc++.h>
#define rep(i,n) for (int i = 0; i < (n); ++i)
using namespace std;
typedef long long ll;

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

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

#include<iostream>
using namespace std;
int main (void){
  stirng s;
  cin >> s;
  replace(3,1,"8");
  cout << s;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:4:3: error: 'stirng' was not declared in this scope
    4 |   stirng s;
      |   ^~~~~~
a.cc:5:10: error: 's' was not declared in this scope
    5 |   cin >> s;
      |          ^
a.cc:6:3: error: 'replace' was not declared in this scope
    6 |   replace(3,1,"8");
      |   ^~~~~~~
Language: C++

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

Compiler output:
a.cc: In function 'int main()':
a.cc:4:3: error: 'stirng' was not declared in this scope
    4 |   stirng s;
      |   ^~~~~~
a.cc:5:10: error: 's' was not declared in this scope
    5 |   cin >> s;
      |          ^
Language: Java

import java.util.Scanner;

public class ABC085A {

	public static void main(String[] args) {

		Scanner c = new Scanner(System.in);
		System.out.println("2018"+c.next().substring(4));
	}
}

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

#include<iostream>
#include<string>

using namespace std;

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


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

#include <bits/stdc++.h>
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:6:11: error: expected ';' before 's'
    6 |   cin >> s
      |           ^
      |           ;
    7 | 
    8 |  s[3] == '8';
      |  ~
Language: C++

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

int main() {
    //input
    string str;
    str.at(3) = "8";
    cout << str << endl;

    return 0;
}

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

#include <iostream>
#include <string.h>
#include <algorithm>
#include <array>
#include <vector>

using namespace std;

int main( void ) {

    string s;
    cin >> s;
    s[3] = "8";

    cout << s << endl;

    return 0;
}

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

#include <set>
#include <map>
#include <list>
#include <queue>
#include <stack>
#include <cmath>
#include <ctime>
#include <cstdio>
#include <vector>
#include <string>
#include <bitset>
#include <cctype>
#include <cstdlib>
#include <cstring>
#include <utility>
#include <numeric>
#include <complex>
#include <sstream>
#include <fstream>
#include <iomanip>
#include <cassert>
#include <iostream>
#include <iterator>
#include <algorithm>
using namespace std;
typedef long long ll;
typedef vector<int> vint;
typedef pair<int, int> pint;
#define rep(i, n) REP(i, 0, n)
#define all(v) v.begin(), v.end()
#define REP(i, x, n) for(int i = x; i < n; i++)
#define INF 2e9
signed main(){
    cin.tie(0);
    ios::sync_with_stdio(false);
    int m;
    string s;
    cin>>s;
    s[3]='8';
    cout<<s<<'\n';
    }
    return(0);
}

Compiler output:
a.cc:42:5: error: expected unqualified-id before 'return'
   42 |     return(0);
      |     ^~~~~~
a.cc:43:1: error: expected declaration before '}' token
   43 | }
      | ^
Language: C++

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

int main(){
  string s;
  cin >> s;
  s.at(3) = '8'
  cout << s << endl;
}

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

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

int main(){
  string s;
  cin >> s;
  s.at(3) = 8
  cout << s << endl;
}

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

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


Compiler output:
a.cc: In function 'int main()':
a.cc:6:13: error: expected ';' before 'else'
    6 |     S[3] = 8
      |             ^
      |             ;
    7 |         else  cout << S << endl;
      |         ~~~~ 
a.cc: At global scope:
a.cc:9:1: error: expected declaration before '}' token
    9 | }
      | ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
int main(){
    string S;
    cin >> S;
    for(int i = 0;i < S.size();i++){
        if(i == 3) cout << 8 << ;
        else  cout << S[i] << ;
    }
}


Compiler output:
a.cc: In function 'int main()':
a.cc:7:33: error: expected primary-expression before ';' token
    7 |         if(i == 3) cout << 8 << ;
      |                                 ^
a.cc:8:31: error: expected primary-expression before ';' token
    8 |         else  cout << S[i] << ;
      |                               ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
int main(){
    string S;
    cin >> S;
    for(int = 0;i < S.size();i++){
        if(i == 3) cout << 8 << ;
        else  cout << S[i] << ;
    }
}


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

#include <bits/stdc++.h>
using namespace std;
int main(){
    string S;
    cin >> S;
    for(int = 0;i < S.size();i++){
        if(i =3) cout << 8 << ;
        else  cout << S[i] << ;
    }
}


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

e <bits/stdc++.h>
using namespace std;
int main(){
    string S;
    cin >> S;
    for(int = 0;i < S.size();i++){
        if(i =3) cout << 8 << ;
        else  cout << S[i] << ;
    }
}


Compiler output:
a.cc:1:1: error: 'e' does not name a type
    1 | e <bits/stdc++.h>
      | ^
a.cc: In function 'int main()':
a.cc:4:5: error: 'string' was not declared in this scope
    4 |     string S;
      |     ^~~~~~
a.cc:5:5: error: 'cin' was not declared in this scope
    5 |     cin >> S;
      |     ^~~
a.cc:5:12: error: 'S' was not declared in this scope
    5 |     cin >> S;
      |            ^
a.cc:6:13: error: expected unqualified-id before '=' token
    6 |     for(int = 0;i < S.size();i++){
      |             ^
a.cc:6:12: error: expected ';' before '=' token
    6 |     for(int = 0;i < S.size();i++){
      |            ^~
      |            ;
a.cc:6:13: error: expected primary-expression before '=' token
    6 |     for(int = 0;i < S.size();i++){
      |             ^
a.cc:6:17: error: 'i' was not declared in this scope
    6 |     for(int = 0;i < S.size();i++){
      |                 ^
a.cc:6:29: error: expected ')' before ';' token
    6 |     for(int = 0;i < S.size();i++){
      |        ~                    ^
      |                             )
a.cc:6:30: error: 'i' was not declared in this scope
    6 |     for(int = 0;i < S.size();i++){
      |                              ^
Language: C

#include <stdio.h>

int main() {
  char s[100];
  scanf("%s", s);
  
  s[3] = 8;
  printf("%s\n", s);
  
  return 0;
  ]

Compiler output:
main.c: In function 'main':
main.c:11:3: error: expected statement before ']' token
   11 |   ]
      |   ^
main.c:11:3: error: expected declaration or statement at end of input
Language: C

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

#define REP(i,n) for(i=0;i<n;i++)
#define ll long long

int main(void){
    char s[10];
    int i;

    REP(i,10){
        scanf("%c",&s[i]);
    }
    
    s[4]='8';

    REP(i,10){
        printf("%d",s[i])
    }
    return 0;
}

Compiler output:
main.c: In function 'main':
main.c:20:26: error: expected ';' before '}' token
   20 |         printf("%d",s[i])
      |                          ^
      |                          ;
   21 |     }
      |     ~
Language: C

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

#define REP(i,n) for(i=0;i<n;i++)
#define ll long long

int main(void){
    char s[10];
    int i;

    REP(i,10){
        scanf("%c",&s[i]);
    }
    
    s[4]='8';

    REP(i,10){
        prinf("%d",s[i])
    }
    return 0;
}

Compiler output:
main.c: In function 'main':
main.c:20:9: error: implicit declaration of function 'prinf'; did you mean 'printf'? [-Wimplicit-function-declaration]
   20 |         prinf("%d",s[i])
      |         ^~~~~
      |         printf
main.c:20:25: error: expected ';' before '}' token
   20 |         prinf("%d",s[i])
      |                         ^
      |                         ;
   21 |     }
      |     ~
Language: C

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

#define REP(i,n) for(i=0;i<n;i++)
#define ll long long

int main(void){
    char s[10];
    int i;

    REP(i,10){
        scanf("%c",&s[i]);
    }
    
    s[4]=8;

    REP(i,10){
        prinf("%d",s[i])
    }
    return 0;
}

Compiler output:
main.c: In function 'main':
main.c:20:9: error: implicit declaration of function 'prinf'; did you mean 'printf'? [-Wimplicit-function-declaration]
   20 |         prinf("%d",s[i])
      |         ^~~~~
      |         printf
main.c:20:25: error: expected ';' before '}' token
   20 |         prinf("%d",s[i])
      |                         ^
      |                         ;
   21 |     }
      |     ~
Language: C++

using namespace std;

int main(){
  string S;
  cin >> S;
  
  S.at(3) = '8'
    cout << S << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:4:3: error: 'string' was not declared in this scope
    4 |   string S;
      |   ^~~~~~
a.cc:1:1: note: 'std::string' is defined in header '<string>'; this is probably fixable by adding '#include <string>'
  +++ |+#include <string>
    1 | using namespace std;
a.cc:5:3: 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 | using namespace std;
a.cc:5:10: error: 'S' was not declared in this scope
    5 |   cin >> S;
      |          ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
 
int main(){
    string S;
    cin >> S;
    int n = S.length()
    for (int i = 1; i <= n; i++){
        if (i == 4){
            cout << 8;
        }
        else if (i == n){
            cout << S[i] << endl;
        }
        else {
            cout << S[i];
        }
    }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:5: error: expected ',' or ';' before 'for'
    8 |     for (int i = 1; i <= n; i++){
      |     ^~~
a.cc:8:21: error: 'i' was not declared in this scope
    8 |     for (int i = 1; i <= n; i++){
      |                     ^
Language: C++

void ABC085A()
{
	string s;
	cin >> s;
	s[0] = '2';
	s[1] = '0';
	s[2] = '1';
	s[3] = '8';
	cout << s << endl;
}
int main()
{
  ABC085A();
  return 0;
}

Compiler output:
a.cc: In function 'void ABC085A()':
a.cc:3:9: error: 'string' was not declared in this scope
    3 |         string s;
      |         ^~~~~~
a.cc:4:9: error: 'cin' was not declared in this scope
    4 |         cin >> s;
      |         ^~~
a.cc:4:16: error: 's' was not declared in this scope
    4 |         cin >> s;
      |                ^
a.cc:9:9: error: 'cout' was not declared in this scope
    9 |         cout << s << endl;
      |         ^~~~
a.cc:9:22: error: 'endl' was not declared in this scope
    9 |         cout << s << endl;
      |                      ^~~~
Language: Java

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

Compiler output:
Main.java:5: error: incompatible types: int cannot be converted to String
      String str = sc.nextInt();
                             ^
1 error
Language: Java

public class Main {
  public static void main(String[] args) {
    int N = Integer.parseInt(args[0]);
    int Y = Integer.parseInt(args[1]);

    int Yukichi, Higuchi, Noguchi;
    boolean flag = false;

    for(Yukichi = 0; Yukichi <= Y; Yukichi++){
      for(Higuchi = 0; Yukichi + Higuchi <= Y; Higuchi++){
        Noguchi = N - (Yukichi + Higuchi);
        int num = 10000*Yukichi + 5000*Higuchi + 1000*Noguchi;
        if(num == N)
          flag = true;
          break;
      }
    }
    if(flag)
      System.out.println(Yukichi +" "+ Higuchi +" "+ Noguchi);
    else
      System.out.println(-1 +" "+ -1 +" "+ -1);
  }
}

Compiler output:
Main.java:19: error: variable Higuchi might not have been initialized
      System.out.println(Yukichi +" "+ Higuchi +" "+ Noguchi);
                                       ^
Main.java:19: error: variable Noguchi might not have been initialized
      System.out.println(Yukichi +" "+ Higuchi +" "+ Noguchi);
                                                     ^
2 errors
Language: C++

#include"bits/stdc++.h"
using namespace std;
int main(){
 int N;
  cin>>N;
  vector<int> S(N);
 for(int i=0; i<N;i++){
  cin>>S.at(i);}
  sort(S.begin(),S.end());
  int X=S.size();
  for(int i=0;i<N-1;i++){
    if(S.(i)==S.(i+1)){
X=X-2;
    }
  }
  cout<<X<<endl;}
#include"bits/stdc++.h"
using namespace std;
int main(){
 int N;
  cin>>N;
  vector<int> S(N);
 for(int i=0; i<N;i++){
  cin>>S.at(i);}
  sort(S.begin(),S.end());
  int X=S.size();
  for(int i=0;i<N-1;i++){
    if(S.at(i)=S.at(i+1)){
X=X-2;
    }
  }
  cout<<X<<endl;}
提出情報

Compiler output:
a.cc: In function 'int main()':
a.cc:12:10: error: expected unqualified-id before '(' token
   12 |     if(S.(i)==S.(i+1)){
      |          ^
a.cc:12:17: error: expected unqualified-id before '(' token
   12 |     if(S.(i)==S.(i+1)){
      |                 ^
a.cc: At global scope:
a.cc:19:5: error: redefinition of 'int main()'
   19 | int main(){
      |     ^~~~
a.cc:3:5: note: 'int main()' previously defined here
    3 | int main(){
      |     ^~~~
a.cc:33:1: error: '\U000063d0\U000051fa\U000060c5\U00005831' does not name a type
   33 | 提出情報
      | ^~~~~~~~
Language: Java

import java.util.Scanner;
public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int N = sc.nextInt();
		int Y = sc.nextInt();
		for(int a=0;a<=N;a++) {
			if(a*10000>Y) {
				break;
			}
			for(int b=0;b<=N;b++) {
				if((a*10000)+(b*5000)>Y) {
					break;
				}
					for(int c=0;c<=N;c++) {
						int sum = (10000*a)+(5000*b)+(1000*c);
						count++;
						if(sum==Y&&a+b+c==N) {
							System.out.println(a+" "+b+" "+c);
							System.exit(0);
					}
			}
		}
	}
		System.out.print("-1 "+"-1 "+"-1");
}
}


Compiler output:
Main.java:17: error: cannot find symbol
						count++;
						^
  symbol:   variable count
  location: class Main
1 error
Language: C


#include <stdio.h>

int main(void) {
    char s[10];
    scanf("%s", s);
    s[3] = '8'
    printf("%s\n", s);
}


Compiler output:
main.c: In function 'main':
main.c:7:15: error: expected ';' before 'printf'
    7 |     s[3] = '8'
      |               ^
      |               ;
    8 |     printf("%s\n", s);
      |     ~~~~~~
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main()
{
  string S;
  cin >> S;
  s.at(3)='8';
  cout << S << endl;
}


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

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


Compiler output:
a.cc: In function 'int main()':
a.cc:7:3: error: 's' was not declared in this scope
    7 |   s.at(3)=8;
      |   ^
Language: Java

public class Main{
	
	public static void main(String[] args) {
		Scanner stdIn = new Scanner(System.in);

		int n,num1,num2,num3;
		int cash;
		n = stdIn.nextInt();
		cash = stdIn.nextInt();

		num1 = cash/10000;
		cash = cash - num1*10000;		

		num2 = cash/5000;
		cash = cash - num2*5000; 
		 

		num3 = cash/1000;
		
		if(num1+num2+num3==n){
		System.out.print(num1+" ");
		System.out.print(num2+" ");
		System.out.println(num3);
		}else{
		System.out.print(-1+" ");
		System.out.print(-1+" ");
		System.out.println(-1);
		}

		
	}

}


Compiler output:
Main.java:4: error: cannot find symbol
		Scanner stdIn = new Scanner(System.in);
		^
  symbol:   class Scanner
  location: class Main
Main.java:4: error: cannot find symbol
		Scanner stdIn = new Scanner(System.in);
		                    ^
  symbol:   class Scanner
  location: class Main
2 errors
Language: Java

public class Main
	
	public static void main(String[] args) {
		Scanner stdIn = new Scanner(System.in);

		int n,num1,num2,num3;
		int cash;
		n = stdIn.nextInt();
		cash = stdIn.nextInt();

		num1 = cash/10000;
		cash = cash - num1*10000;		

		num2 = cash/5000;
		cash = cash - num2*5000; 
		 

		num3 = cash/1000;
		
		if(num1+num2+num3==n){
		System.out.print(num1+" ");
		System.out.print(num2+" ");
		System.out.println(num3);
		}else{
		System.out.print(-1+" ");
		System.out.print(-1+" ");
		System.out.println(-1);
		}

		
	}

}

Compiler output:
Main.java:1: error: '{' expected
public class Main
                 ^
Main.java:3: 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:33: error: class, interface, enum, or record expected
}
^
3 errors
Language: C++

#include<iostream>
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:13: error: expected ';' before 'cout'
    7 |   s[3] = '8'
      |             ^
      |             ;
    8 |   cout << s << endl;
      |   ~~~~
Language: C++

#include <bits/stdc++.h>
#define int long long
using namespace std;
signed main(){
	sring s;
	cin>>s;
s.at(3)='8';
cout<<s;
}

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

#include <bits/stdc++.h>
#define int long long
using namespace std;
signed main(){
	sring s;
	cin>>s;
s.at(3)=8;
cout<<s;
}

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

,>,>,>,+>,>,>,>,>,>,
<<<<<<<<<
.>.>.>.>.>.>.>.>.>.


Compiler output:
a.cc:1:1: error: expected unqualified-id before ',' token
    1 | ,>,>,>,+>,>,>,>,>,>,
      | ^
a.cc:1:2: error: expected unqualified-id before '>' token
    1 | ,>,>,>,+>,>,>,>,>,>,
      |  ^
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main()
{
    int i,j,k;
    char str[15];
    while(true)
        {
          // scanf("%s",&str);
          gets(str);
           int len=strlen(str);
            for(i=0;i<len;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<<str[i];
                }
            }
            cout<<endl;
        }
}


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

// Author: Mohammad Faisal
#include<bits/stdc++.h>
using namespace std;
int main()
{
  int s;
  cin >> s;
  if(s[0]=='2' && s[1]=='0' && s[2]=='1' && s[3]=='7')
  {
	s[3]='8';
  }
  cout<<s<<endl;
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:7: error: invalid types 'int[int]' for array subscript
    8 |   if(s[0]=='2' && s[1]=='0' && s[2]=='1' && s[3]=='7')
      |       ^
a.cc:8:20: error: invalid types 'int[int]' for array subscript
    8 |   if(s[0]=='2' && s[1]=='0' && s[2]=='1' && s[3]=='7')
      |                    ^
a.cc:8:33: error: invalid types 'int[int]' for array subscript
    8 |   if(s[0]=='2' && s[1]=='0' && s[2]=='1' && s[3]=='7')
      |                                 ^
a.cc:8:46: error: invalid types 'int[int]' for array subscript
    8 |   if(s[0]=='2' && s[1]=='0' && s[2]=='1' && s[3]=='7')
      |                                              ^
a.cc:10:10: error: invalid types 'int[int]' for array subscript
   10 |         s[3]='8';
      |          ^
Language: C++

#include <iostream>
#include <algorithm>
#include <string>
#include <vector>
#include <cmath>
#include <set>
#include <map>
#include <queue>
using namespace std;
#define rep(i,n) for(int i = 0;i<n;i++)
const long long MOD = 1000000007LL;
const string alpha = "abcdefghijklmnopqrstuvwxyz";
int main(){
  string s;
  cin >> s;
  cout << 2017;
  for(int i = 4;i<s.size();i++){
    cout << s[i];
}

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

// warm heart, wagging tail,and a smile just for you!
//                                                                     ███████████
//                                                                   ███╬╬╬╬╬╬╬╬╬╬███
//                                                                ███╬╬╬╬╬████╬╬╬╬╬╬███
//                                            ███████████       ██╬╬╬╬╬████╬╬████╬╬╬╬╬██
//                                      █████████╬╬╬╬╬████████████╬╬╬╬╬██╬╬╬╬╬╬███╬╬╬╬╬██
//                               ████████╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬█████████╬╬╬╬╬╬██╬╬╬╬╬╬╬██
//                             ████╬██╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬█████████╬╬╬╬╬╬╬╬╬╬╬██
//                           ███╬╬╬█╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬██╬╬███╬╬╬╬╬╬╬█████
//                         ███╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬██╬╬╬████████╬╬╬╬╬██
//                       ███╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬███╬╬╬╬╬╬╬╬╬███
//                     ███╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬█████╬╬╬╬╬╬╬██
//                 ████╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬████╬╬╬╬╬████
//     █████████████╬╬╬╬╬╬╬╬██╬╬╬╬╬████╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬█████╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬███╬╬╬╬██████
//   ████╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬██╬╬██████╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬██████╬╬╬╬╬╬╬███████████╬╬╬╬╬╬╬╬██╬╬╬██╬╬╬██
// ███╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬██╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬██╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬████╬╬╬╬╬╬╬╬╬╬╬█╬╬╬╬╬╬╬██╬╬╬╬╬╬╬╬██
// ██╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬██╬╬╬╬▓▓▓▓▓▓╬╬╬████╬╬████╬╬╬╬╬╬╬▓▓▓▓▓▓▓▓██╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬██╬╬╬╬╬╬╬███
// ██╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬██████▓▓▓▓▓▓▓╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬▓▓▓▓▓▓▓██╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬██╬╬╬╬█████
// ███╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬███╬╬╬╬╬██╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬█████╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬████████
//   ███╬╬╬╬╬╬╬╬╬╬╬╬╬█████╬╬╬╬╬╬╬╬██╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬███╬╬██╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬██
//       ██████████████  ████╬╬╬╬╬╬███████████████████████████╬╬╬╬╬██╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬████
//                         ███████                           █████  ███████████████████
#include "bits/stdc++.h"
using namespace std;
#define MOD 1000000007
//#define MOD 998244353
const double EPS = 1e-9;
#define INF (1LL<<60)
#define D double
#define fs first
#define sc second
#define int long long
#define FOR(i,a,b) for(int i=(a);i<(b);++i)
#define RFOR(i,a,b) for(int i = (b-1);i>=(a);--i)
#define REP(i,n)  FOR(i,0,(n))
#define RREP(i,n) RFOR(i,0,(n))
#define ITR(itr,mp) for(auto itr = (mp).begin(); itr != (mp).end(); ++itr)
#define RITR(itr,mp) for(auto itr = (mp).rbegin(); itr != (mp).rend(); ++itr)
#define range(i,a,b) ((a)<=(i) && (i)<(b))
#define debug(x)  cout << #x << " = " << (x) << endl;
#define SP << " " << 
typedef pair<int,int> P;
typedef vector<int> vec;
typedef vector<vector<int>> mat;

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

  strnig s;
  cin >> s;

  s[3] = '8';

  cout << s << endl;

  return 0;
}

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

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

int main(){
    string s;
    cin >> s;
    if (s[3] == "7") s[3] = "8";
    cout << s << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:10:14: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   10 |     if (s[3] == "7") s[3] = "8";
a.cc:10:29: error: invalid conversion from 'const char*' to '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type' {aka 'char'} [-fpermissive]
   10 |     if (s[3] == "7") s[3] = "8";
      |                             ^~~
      |                             |
      |                             const char*
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 <iostrem>

using namespace std;

int main() {
  string s = "";
  cin >> s;
  s.at(3) = '8';
  cout << s << endl;
  return 0;
}


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

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

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

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

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

int main() {
  string str = s;
  str.at(4)='8';
  cout<<str<<endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:5:16: error: 's' was not declared in this scope
    5 |   string str = s;
      |                ^
Language: C++

#include<bits/stdc++.h>
#include <math.h>
#include<iostream>
#include <string>
using namespace std;
typedef long long ll;
#define pb pushback
#define fr(i,n) for(int i=0;i<n;i++)
#define ifr(i,n) for(int i=n-1;i>=0;i--)


int main() {
    string x;
	cin >> x;
    x.replace(3,1,"8")
      cout << x << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:15:23: error: expected ';' before 'cout'
   15 |     x.replace(3,1,"8")
      |                       ^
      |                       ;
   16 |       cout << x << endl;
      |       ~~~~
Language: C++

#include<bits/stdc++.h>
#include <math.h>
#include<iostream>
#include <string>
using namespace std;
typedef long long ll;
#define pb pushback
#define fr(i,n) for(int i=0;i<n;i++)
#define ifr(i,n) for(int i=n-1;i>=0;i--)


int main() {
    string x;
	cin >> x;
    x[3]="8"
      cout << x << endl;
}

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

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

int main() {
  string a; cin >> a;
  cout  << 2017/01/ << a.at(8) << a.at(9) << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:6:21: error: expected primary-expression before '<<' token
    6 |   cout  << 2017/01/ << a.at(8) << a.at(9) << endl;
      |                     ^~
Language: C++

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

int main() {
  string s;
  cin >> s;
  s.at(3) = '8'
  cout << s << endl;
}

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

#include <iostream>
#include<algorithm>
#include<map>

using namespace std;
 
int main(void){
	
	sring s;
	
	cin >> s;
	
	s[3] = '8';

	cout << s;
	
	return 0;
}

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

#include<bits/stdc++.h>
using namespace std;
#define rep(i,n) for(int i=0;i<(int)(n);i++)

int main(){
  int year,month,day
  string c1,c2;
  cin>>year>>c1>>month>>c2>>day;
  cout<<year+1<<c1<<month<<c2<<day;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:7:3: error: expected initializer before 'string'
    7 |   string c1,c2;
      |   ^~~~~~
a.cc:8:14: error: 'c1' was not declared in this scope; did you mean 'y1'?
    8 |   cin>>year>>c1>>month>>c2>>day;
      |              ^~
      |              y1
a.cc:8:25: error: 'c2' was not declared in this scope
    8 |   cin>>year>>c1>>month>>c2>>day;
      |                         ^~
a.cc:8:29: error: 'day' was not declared in this scope
    8 |   cin>>year>>c1>>month>>c2>>day;
      |                             ^~~
Language: C++

#include <iostream>
using namespace std;

int main() {
  char date;
  cin >> date;
  date.replace(0, 3, '2018');
  cout << date << endl;
}

Compiler output:
a.cc:7:22: warning: multi-character character constant [-Wmultichar]
    7 |   date.replace(0, 3, '2018');
      |                      ^~~~~~
a.cc: In function 'int main()':
a.cc:7:8: error: request for member 'replace' in 'date', which is of non-class type 'char'
    7 |   date.replace(0, 3, '2018');
      |        ^~~~~~~
Language: C++

#include <iostream>
using namespace std;

int main() {
  char date;
  cin >> date;
  date.replace(0, 3, '2018')
  cout << date << endl;
}

Compiler output:
a.cc:7:22: warning: multi-character character constant [-Wmultichar]
    7 |   date.replace(0, 3, '2018')
      |                      ^~~~~~
a.cc: In function 'int main()':
a.cc:7:8: error: request for member 'replace' in 'date', which is of non-class type 'char'
    7 |   date.replace(0, 3, '2018')
      |        ^~~~~~~
Language: C++

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

typedef long long ll;
typedef unsigned long long ull;
typedef string st;
typedef double db;
typedef vector<long long> vecll;
typedef vector<char> vechar;

int main(){
    st s;
    cin >> s;
    s.at(3) = 8
    cout << s << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:14:16: error: expected ';' before 'cout'
   14 |     s.at(3) = 8
      |                ^
      |                ;
   15 |     cout << s << endl;
      |     ~~~~
Language: C++

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

string S="yyyy/mm/dd";
cin>>S;


for(int i=0;i<S.size();i++){
  if(S.at(3)=='7'){
    S.at(3)='8';
  }
}

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

#include<bits/stdc++.h>
using namespace std;
int main(){
  
string S="yyyy/mm/dd";
  if(S.at(3)=='7'){
    S.at(3)='8'
  }
  cout<<S<<endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:7:16: error: expected ';' before '}' token
    7 |     S.at(3)='8'
      |                ^
      |                ;
    8 |   }
      |   ~
Language: C++

#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
int main()
{
  string s;
  cin>>s;
  for(ll i=0;i<s.size();i++){
  	if(i==3) cout<<"8";
    else cout<<s[i]
  }
  cout<<"\n";
}


Compiler output:
a.cc: In function 'int main()':
a.cc:10:20: error: expected ';' before '}' token
   10 |     else cout<<s[i]
      |                    ^
      |                    ;
   11 |   }
      |   ~
Language: C++

#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
int main()
{
  string s;
  cin>>s;
  for(ll i=0;i<s.size();i++){
  	if(i==3) cout<<"8";
    else cour<<s[i]
  }
  cout<<"\n";
}


Compiler output:
a.cc: In function 'int main()':
a.cc:10:10: error: 'cour' was not declared in this scope
   10 |     else cour<<s[i]
      |          ^~~~
Language: C++

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

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

Compiler output:
a.cc: In function 'int main()':
a.cc:6:17: error: expected primary-expression before ';' token
    6 |         cin>>l>>;
      |                 ^
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:7:1: error: extended character 　 is not valid in an identifier
    7 | 　　string s;
      | ^
a.cc:7:1: error: extended character 　 is not valid in an identifier
a.cc:8:1: error: extended character 　 is not valid in an identifier
    8 | 　　cin >> s;
      | ^
a.cc:8:1: error: extended character 　 is not valid in an identifier
a.cc: In function 'int main()':
a.cc:7:1: error: '\U00003000\U00003000string' was not declared in this scope
    7 | 　　string s;
      | ^~~~~~~~~~
a.cc:8:1: error: '\U00003000\U00003000cin' was not declared in this scope
    8 | 　　cin >> s;
      | ^~~~~~~
a.cc:8:12: error: 's' was not declared in this scope
    8 | 　　cin >> s;
      |            ^
Language: C++

using namespace std;
int main(){
  string s;
     cin>>s;
   s.at(3)=8;
  cout<<s<<endl;
}
      


Compiler output:
a.cc: In function 'int main()':
a.cc:3:3: error: 'string' was not declared in this scope
    3 |   string s;
      |   ^~~~~~
a.cc:1:1: note: 'std::string' is defined in header '<string>'; this is probably fixable by adding '#include <string>'
  +++ |+#include <string>
    1 | using namespace std;
a.cc:4:6: error: 'cin' was not declared in this scope
    4 |      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 | using namespace std;
a.cc:4:11: error: 's' was not declared in this scope
    4 |      cin>>s;
      |           ^
a.cc:6:3: error: 'cout' was not declared in this scope
    6 |   cout<<s<<endl;
      |   ^~~~
a.cc:6:3: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:6:12: error: 'endl' was not declared in this scope
    6 |   cout<<s<<endl;
      |            ^~~~
a.cc:1:1: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
  +++ |+#include <ostream>
    1 | using namespace std;
Language: C++

using namespace std;
int main(){
   char s[31]
     cin>>s;
   char[3]=8;
  cout<<s<<endl;
}
      

Compiler output:
a.cc: In function 'int main()':
a.cc:4:6: error: expected initializer before 'cin'
    4 |      cin>>s;
      |      ^~~
a.cc:5:9: error: expected identifier before numeric constant
    5 |    char[3]=8;
      |         ^
a.cc:5:9: error: expected ']' before numeric constant
    5 |    char[3]=8;
      |         ^
      |         ]
a.cc:5:8: error: structured binding declaration cannot have type 'char'
    5 |    char[3]=8;
      |        ^
a.cc:5:8: note: type must be cv-qualified 'auto' or reference to cv-qualified 'auto'
a.cc:5:8: error: empty structured binding declaration
a.cc:6:3: error: 'cout' was not declared in this scope
    6 |   cout<<s<<endl;
      |   ^~~~
a.cc:1:1: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
  +++ |+#include <iostream>
    1 | using namespace std;
a.cc:6:9: error: 's' was not declared in this scope
    6 |   cout<<s<<endl;
      |         ^
a.cc:6:12: error: 'endl' was not declared in this scope
    6 |   cout<<s<<endl;
      |            ^~~~
a.cc:1:1: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
  +++ |+#include <ostream>
    1 | using namespace std;
Language: C++

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

int main(){
 string S;
 cin >> S;
    for(char C : S){
        if(C(3) == '7'){
            C = '8';
        }
        cout << C;
    }
    cout << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:13: error: 'C' cannot be used as a function
    8 |         if(C(3) == '7'){
      |            ~^~~
Language: C++

#include <iostream>
using namespace std;

main(){
	int S;
	cin >> S;

	if(S[4] != 2018){
	cout<< 2018 << stdl;
}

Compiler output:
a.cc:4:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
    4 | main(){
      | ^~~~
a.cc: In function 'int main()':
a.cc:8:13: error: invalid types 'int[int]' for array subscript
    8 |         if(S[4] != 2018){
      |             ^
a.cc:9:24: error: 'stdl' was not declared in this scope; did you mean 'std'?
    9 |         cout<< 2018 << stdl;
      |                        ^~~~
      |                        std
a.cc:10:2: error: expected '}' at end of input
   10 | }
      |  ^
a.cc:4:7: note: to match this '{'
    4 | main(){
      |       ^
Language: C++

#input <iostream>
using namespace std;

main(){
	std S;
	cin >> S;

	if(S[4] != 2018){
	cout<< 2018 << stdl;
}

Compiler output:
a.cc:1:2: error: invalid preprocessing directive #input
    1 | #input <iostream>
      |  ^~~~~
a.cc:4:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
    4 | main(){
      | ^~~~
a.cc: In function 'int main()':
a.cc:5:13: error: expected primary-expression before 'S'
    5 |         std S;
      |             ^
a.cc:6:9: error: 'cin' was not declared in this scope
    6 |         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 | #input <iostream>
a.cc:6:16: error: 'S' was not declared in this scope
    6 |         cin >> S;
      |                ^
a.cc:9:9: error: 'cout' was not declared in this scope
    9 |         cout<< 2018 << stdl;
      |         ^~~~
a.cc:9:9: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:9:24: error: 'stdl' was not declared in this scope; did you mean 'std'?
    9 |         cout<< 2018 << stdl;
      |                        ^~~~
      |                        std
a.cc:10:2: error: expected '}' at end of input
   10 | }
      |  ^
a.cc:4:7: note: to match this '{'
    4 | main(){
      |       ^
Language: C++

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

int main() {
  string S;

  cin >> S;

  if (S.at(3) == "7") S.at(3) = "8";

  cout << S;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:9:15: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
    9 |   if (S.at(3) == "7") S.at(3) = "8";
      |       ~~~~~~~~^~~~~~
a.cc:9:33: error: invalid conversion from 'const char*' to '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type' {aka 'char'} [-fpermissive]
    9 |   if (S.at(3) == "7") S.at(3) = "8";
      |                                 ^~~
      |                                 |
      |                                 const char*
Language: C++

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

int main() {
  int S;

  cin >> S;

  if (S.at(3) == "7") S.at(3) = "8";

  cout << S;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:9:9: error: request for member 'at' in 'S', which is of non-class type 'int'
    9 |   if (S.at(3) == "7") S.at(3) = "8";
      |         ^~
a.cc:9:25: error: request for member 'at' in 'S', which is of non-class type 'int'
    9 |   if (S.at(3) == "7") S.at(3) = "8";
      |                         ^~
Language: C++

#include <iostream>
#include <string>

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:3: error: 'string' was not declared in this scope
    6 |   string S;
      |   ^~~~~~
a.cc:6:3: 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:7:3: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
    7 |   cin >> S;
      |   ^~~
      |   std::cin
/usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here
   62 |   extern istream cin;           ///< Linked to standard input
      |                  ^~~
a.cc:7:10: error: 'S' was not declared in this scope
    7 |   cin >> S;
      |          ^
a.cc:11:3: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   11 |   cout << S << 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:11:16: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
   11 |   cout << S << endl;
      |                ^~~~
      |                std::endl
/usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here
  744 |     endl(basic_ostream<_CharT, _Traits>& __os)
      |     ^~~~
Language: Java

import java.util.*;
 
class Main{
    public static void main(String args[]){
        Scanner sc = new Scanner(System.in);
        String s = sc.nextInt();
        s = s.replaceAll("2017/01","");
        System.out.println("2018/01"+s);
    }
}

Compiler output:
Main.java:6: error: incompatible types: int cannot be converted to String
        String s = sc.nextInt();
                             ^
1 error