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

#include <iostream>
using namespace std;

int main() {
    int s[14], h[14], c[14], d[14], rank, i;
    char suit;

    for(i=0;i<14;i++){
        s[i]=0;
        h[i]=0;
        c[i]=0;
        d[i]=0;
    }

    cin >> num;
    for(i=0;i<num;i++){
        cin >> suit >> rank;
        switch(suit){
            case 'S':
                s[rank]=1;
                break;
            case 'H':
                h[rank]=1;
                break;
            case 'C':
                c[rank]=1;
                break;
            case 'D':
                d[rank]=1;
                break;
        }
    }
    for(i=1;i<14;i++){
        if(s[i]==0)
        cout << "S " << i << endl;
    }
    for(i=1;i<14;i++){
        if(h[i]==0)
        cout << "H " << i << endl;
    }
    for(i=1;i<14;i++){
        if(c[i]==0)
        cout << "C " << i << endl;
    }
    for(i=1;i<14;i++){
        if(d[i]==0)
        cout << "D " << i << endl;
    }
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:15:12: error: 'num' was not declared in this scope; did you mean 'enum'?
   15 |     cin >> num;
      |            ^~~
      |            enum
Language: C++

#include <iostream>
using namespace std;

int int main(){
  bool cards[4][14];
  int n, rank;
  char suit;
  
  for ( int s = 0; s < 4; s++)
    for ( int r = 1; r <= 13; r++)
      cards[s][r] = 0;

  cin >> n;
  for ( int i = 0; i < n; i++ ){
    cin >> suit >> rank;
    if ( suit == "S" ) cards[0][rank] = 1;
    if ( suit == "H" ) cards[1][rank] = 1;
    if ( suit == "C" ) cards[2][rank] = 1;
    if ( suit == "D" ) cards[3][rank] = 1;
  }

  for ( int s = 0; s < 4; s++ ){
    for ( int r = 1; r <= 13; r++ ){
      if ( cards[s][r] ) continue;
      if ( s == 0 ) suit = "S";
      if ( s == 1 ) suit = "H";
      if ( s == 2 ) suit = "C";
      if ( s == 3 ) suit = "D";
      cout << suit << " " << r << endl;
    }
  }
  return 0;
}


Compiler output:
a.cc:4:1: error: two or more data types in declaration of 'main'
    4 | int int main(){
      | ^~~
Language: C++

#include <iostream>
using namespace std;

int main(){
  bool cards[4][14];
  int n, rank;
  char suit;
  
  for ( int s = 0; s < 4; s++)
    for ( int r = 1; r <= 13; r++)
      cards[s][r] = 0;

  cin >> n;
  for ( int i = 0; i < n; i++ ){
    cin >> suit >> rank;
    if ( suit == "S" ) cards[0][rank] = 1;
    if ( suit == "H" ) cards[1][rank] = 1;
    if ( suit == "C" ) cards[2][rank] = 1;
    if ( suit == "D" ) cards[3][rank] = 1;
  }

  for ( int s = 0; s < 4; s++ ){
    for ( int r = 1; r <= 13; r++ ){
      if ( cards[s][r] ) continue;
      if ( s == 0 ) suit = "S";
      if ( s == 1 ) suit = "H";
      if ( s == 2 ) suit = "C";
      if ( s == 3 ) suit = "D";
      cout << suit << " " << r << endl;
    }
  }
  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:16:15: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   16 |     if ( suit == "S" ) cards[0][rank] = 1;
      |          ~~~~~^~~~~~
a.cc:17:15: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   17 |     if ( suit == "H" ) cards[1][rank] = 1;
      |          ~~~~~^~~~~~
a.cc:18:15: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   18 |     if ( suit == "C" ) cards[2][rank] = 1;
      |          ~~~~~^~~~~~
a.cc:19:15: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   19 |     if ( suit == "D" ) cards[3][rank] = 1;
      |          ~~~~~^~~~~~
a.cc:25:28: error: invalid conversion from 'const char*' to 'char' [-fpermissive]
   25 |       if ( s == 0 ) suit = "S";
      |                            ^~~
      |                            |
      |                            const char*
a.cc:26:28: error: invalid conversion from 'const char*' to 'char' [-fpermissive]
   26 |       if ( s == 1 ) suit = "H";
      |                            ^~~
      |                            |
      |                            const char*
a.cc:27:28: error: invalid conversion from 'const char*' to 'char' [-fpermissive]
   27 |       if ( s == 2 ) suit = "C";
      |                            ^~~
      |                            |
      |                            const char*
a.cc:28:28: error: invalid conversion from 'const char*' to 'char' [-fpermissive]
   28 |       if ( s == 3 ) suit = "D";
      |                            ^~~
      |                            |
      |                            const char*
Language: C++

#include<iostream>
using namespace std;

int main(){
    int n, rank;
    char suit;
    bool cards[4][14];
    
    for(int s = 0; s < 4; s++){
        for(int r = 1; r <= 13; r++){
            cards[s][r] = 0;
        }
    }
    
    cin >> n;
    for(int i = 0; i < n; i++){
        cin >> suit >> rank;
        if(suit == 'S')cards[0][rank] = 1;
        if(suit == 'H')cards[1][rank] = 1;
        if(suit == 'C')cards[2][rank] = 1;
        if(suit == 'D')cards[3][rank] = 1;
    }
    
    for(int s = 0; s < 4; s++){
        for(int r = 1; r <= 13; r++){
            if(cards[s][r]) continue;
            if(s == 0)suit = 'S';
            if(s == 1)suit = 'H';
            if(s == 2)suit = 'C';
            if(s == 3)suit = 'D';
            
            cout << suit << " " << r << endl;
        }
    }
    
    return 0;


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

#include <bits/stdc++.h>
int u[128][14];
const char* d = "SHCD";
int main() {
    int n; cin >> n;
    for (int i = 0; i < n; i++) {
        char c; int d;
        cin >> c >> d;
        u[c][d] = true;
    }
    for (int i = 0; i < 4; i++) {
        for (int j = 1; j <= 13; j++) {
            if (!u[d[i]][j]) {
                cout << d[i] << " " << j << endl;
            }
        }
    }
}


Compiler output:
a.cc: In function 'int main()':
a.cc:5:12: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
    5 |     int n; cin >> n;
      |            ^~~
      |            std::cin
In file included from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:146,
                 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:14:17: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   14 |                 cout << d[i] << " " << j << 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:14:45: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
   14 |                 cout << d[i] << " " << j << endl;
      |                                             ^~~~
      |                                             std::endl
In file included from /usr/include/c++/14/istream:41,
                 from /usr/include/c++/14/sstream:40,
                 from /usr/include/c++/14/complex:45,
                 from /usr/include/c++/14/ccomplex:39,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:127:
/usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here
  744 |     endl(basic_ostream<_CharT, _Traits>& __os)
      |     ^~~~
Language: C++

import java.util.Scanner;

public class Main {
	public static void main(String [] args) {
		Scanner stdIn = new Scanner(System.in);
		int n, x;
		String c;
		boolean dataS[] = new boolean[13];
		boolean dataH[] = new boolean[13];
		boolean dataC[] = new boolean[13];
		boolean dataD[] = new boolean[13];
		
		for(int i = 0; i < 13; i++) {
			dataS[i] = false;
			dataH[i] = false;
			dataC[i] = false;
			dataD[i] = false;
		}
		
		n = stdIn.nextInt();
		
		for( int i = 1; i <= n; i++) {
			c = stdIn.next();
			x = stdIn.nextInt();
			
			switch(c) {
			case "S":
				dataS[x - 1] = true;
				break;
			case "H":
				dataH[x - 1] = true;
				break;
			case "C":
				dataC[x - 1] = true;
				break;
			case "D":
				dataD[x - 1] = true;
				break;
			default:
				break;
			}
		}
		
		for(int i = 0; i < 4; i++) {
			for(int j = 1; j <= 13; j ++) {
				switch(i) {
				case 0:
					if(dataS[j - 1] == false) {
						System.out.println("S　" + j);
					}
					break;
				case 1:
					if(dataH[j - 1] == false) {
						System.out.println("H　" + j);
					}
					break;
				case 2:
					if(dataC[j - 1] == false) {
						System.out.println("C　" + j);
					}
					break;
				case 3:
					if(dataD[j - 1] == false) {
						System.out.println("D　" + j);
						
					}
					break;
				default:
					break;
				}
			}
			
		}
		
	}
}


Compiler output:
a.cc:1:1: error: 'import' does not name a type
    1 | import java.util.Scanner;
      | ^~~~~~
a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:3:1: error: expected unqualified-id before 'public'
    3 | public class Main {
      | ^~~~~~
Language: C++

#include<cstdio>
using namespace std;
int main(){
   int S[13],H[13],C[13],D[13];
   for(int i=0;i<13;i++){
     S[i]=-1;
     H[i]=-1;
     C[i]=-1;
     D[i]=-1;
   }
   int num;
   scanf("%d",&num);
   int n;
   char m;
   for (int j=0;j<num;j++){
    scanf("%c %d",&m,&n);
    if (m=='S'){
        S[n]=1;
    }
    else if (m=='H'){
        H[n]=1;
    }
    else if (m=='C'){
        C[n]=1;
    }
    else if (m=='D'){
        D[n]=1;
    }
   }
   for (int i=0;i<4;i++){
       for(int j=0;j<13;j++){
           if(i==0){
               if(S[j]==-1){
                   printf("S %d\n",j+1);
               }
           }
           else if(i==1){
               if(H[j]==-1){
                   printf("H %d\n",j+1);
               }
           }
           else if(i==2){
               if(C[j]==-1){
                   printf("C %d\n",j+1);
               }
           }
           else if(i==3){
               if(D[j]==-1){
                   printf("D %d\n",j+1);
               }
           }
       }
   }
   printf("\n")
}






Compiler output:
a.cc: In function 'int main()':
a.cc:54:16: error: expected ';' before '}' token
   54 |    printf("\n")
      |                ^
      |                ;
   55 | }
      | ~
Language: C++

#include<cstdio>
using namespace std;
int main(){
   int S[13],H[13],C[13],D[13];
   for(int i=0;i<13;i++){
     S[i]=-1;
     H[i]=-1;
     C[i]=-1;
     D[i]=-1;
   }
   int num;
   scanf("%d",&num);
   int n;
   char m;
   for (int j=0;j<num;j++){
    scanf("%c %d",&m,&n);
    if (m=='S'){
        S[n]=1;
    }
    else if (m=='H'){
        H[n]=1;
    }
    else if (m=='C'){
        C[n]=1;
    }
    else if (m=='D'){
        D[n]=1;
    }
   }
   for (int i=0;i<4;i++){
       for(int j=0;j<13;j++){
           if(i==0){
               if(S[j]==-1){
                   printf("S");
                   printf(" ")
                   printf("%d\n",j+1);
               }
           }
           else if(i==1){
                   printf("H");
                   printf(" ")
                   printf("%d\n",j+1);
               }
           }
           else if(i==2){
               if(C[j]==-1){
                   printf("C");
                   printf(" ")
                   printf("%d\n",j+1);
               }
           }
           else if(i==3){
                   printf("D");
                   printf(" ")
                   printf("%d\n",j+1);
               }
           }
       }
   }
   printf("\n");
}






Compiler output:
a.cc: In function 'int main()':
a.cc:35:31: error: expected ';' before 'printf'
   35 |                    printf(" ")
      |                               ^
      |                               ;
   36 |                    printf("%d\n",j+1);
      |                    ~~~~~~      
a.cc:41:31: error: expected ';' before 'printf'
   41 |                    printf(" ")
      |                               ^
      |                               ;
   42 |                    printf("%d\n",j+1);
      |                    ~~~~~~      
a.cc:45:12: error: 'else' without a previous 'if'
   45 |            else if(i==2){
      |            ^~~~
a.cc:46:21: error: 'j' was not declared in this scope
   46 |                if(C[j]==-1){
      |                     ^
a.cc:48:31: error: expected ';' before 'printf'
   48 |                    printf(" ")
      |                               ^
      |                               ;
   49 |                    printf("%d\n",j+1);
      |                    ~~~~~~      
a.cc:54:31: error: expected ';' before 'printf'
   54 |                    printf(" ")
      |                               ^
      |                               ;
   55 |                    printf("%d\n",j+1);
      |                    ~~~~~~      
a.cc: At global scope:
a.cc:59:4: error: expected declaration before '}' token
   59 |    }
      |    ^
a.cc:60:10: error: expected constructor, destructor, or type conversion before '(' token
   60 |    printf("\n");
      |          ^
a.cc:61:1: error: expected declaration before '}' token
   61 | }
      | ^
Language: C++

#include<cstdio>
using namespace std;
int main(){
   int S[13],H[13],C[13],D[13];
   for(int i=0;i<13;i++){
     S[i]=-1;
     H[i]=-1;
     C[i]=-1;
     D[i]=-1;
   }
   int num;
   scanf("%d",&num);
   int n;
   char m;
   for (int j=0;j<num;j++){
    scanf("%c %d",&m,&n);
    if (m=='S'){
        S[n]=1;
    }
    else if (m=='H'){
        H[n]=1;
    }
    else if (m=='C'){
        C[n]=1;
    }
    else if (m=='D'){
        D[n]=1;
    }
   }
   for (int i=0;i<4;i++){
       for(int j=0;j<13;j++){
           if(i==0){
               if(S[j]==-1){
                   printf("S");
                   printf(" ");
                   printf("%d\n",j+1);
               }
           }
           else if(i==1){
                   printf("H");
                   printf(" ");
                   printf("%d\n",j+1);
               }
           }
           else if(i==2){
               if(C[j]==-1){
                   printf("C");
                   printf(" ");
                   printf("%d\n",j+1);
               }
           }
           else if(i==3){
                   printf("D");
                   printf(" ");
                   printf("%d\n",j+1);
               }
           }
       }
   }
   printf("\n");
}






Compiler output:
a.cc: In function 'int main()':
a.cc:45:12: error: 'else' without a previous 'if'
   45 |            else if(i==2){
      |            ^~~~
a.cc:46:21: error: 'j' was not declared in this scope
   46 |                if(C[j]==-1){
      |                     ^
a.cc:55:34: error: 'j' was not declared in this scope
   55 |                    printf("%d\n",j+1);
      |                                  ^
a.cc: At global scope:
a.cc:59:4: error: expected declaration before '}' token
   59 |    }
      |    ^
a.cc:60:10: error: expected constructor, destructor, or type conversion before '(' token
   60 |    printf("\n");
      |          ^
a.cc:61:1: error: expected declaration before '}' token
   61 | }
      | ^
Language: C++

#include<cstdio>
using namespace std;
int main(){
   int S[13],H[13],C[13],D[13];
   for(int i=0;i<13;i++){
     S[i]=-1;
     H[i]=-1;
     C[i]=-1;
     D[i]=-1;
   }
   int num;
   scanf("%d",&num);
   int n;
   char m;
   for (int j=0;j<num;j++){
    scanf("%c %d",&m,&n);
    if (m=='S'){
        S[n]=1;
    }
    else if (m=='H'){
        H[n]=1;
    }
    else if (m=='C'){
        C[n]=1;
    }
    else if (m=='D'){
        D[n]=1;
    }
   }
   for (int i=0;i<4;i++){
       for(int j=0;j<13;j++){
           if(i==0){
               if(S[j]==-1){
                   printf("S");
                   printf(" ");
                   printf("%d\n",j+1);
               }
           }
           else if(i==1){
                   printf("H");
                   printf(" ");
                   printf("%d\n",j+1);
               }
           }
           else if(i==2){
               if(C[j]==-1){
                   printf("C");
                   printf(" ");
                   printf("%d\n",j+1);
               }
           }
           else if(i==3){
                   printf("D");
                   printf(" ");
                   printf("%d\n",j+1);
               }
           }
       }
   }

}






Compiler output:
a.cc: In function 'int main()':
a.cc:45:12: error: 'else' without a previous 'if'
   45 |            else if(i==2){
      |            ^~~~
a.cc:46:21: error: 'j' was not declared in this scope
   46 |                if(C[j]==-1){
      |                     ^
a.cc:55:34: error: 'j' was not declared in this scope
   55 |                    printf("%d\n",j+1);
      |                                  ^
a.cc: At global scope:
a.cc:59:4: error: expected declaration before '}' token
   59 |    }
      |    ^
a.cc:61:1: error: expected declaration before '}' token
   61 | }
      | ^
Language: C++

#include<cstdio>
using namespace std;
int main(){
   int S[13],H[13],C[13],D[13];
   for(int i=0;i<13;i++){
     S[i]=-1;
     H[i]=-1;
     C[i]=-1;
     D[i]=-1;
   }
   int num;
   scanf("%d",&num);
   int n;
   char m;
   for (int j=0;j<num;j++){
    scanf("%c %d",&m,&n);
    if (m=='S'){
        S[n]=1;
    }
    else if (m=='H'){
        H[n]=1;
    }
    else if (m=='C'){
        C[n]=1;
    }
    else if (m=='D'){
        D[n]=1;
    }
   }
   for (int i=0;i<4;i++){
       for(int j=0;j<13;j++){
           if(i==0){
               if(S[j]==-1){
                   printf("S %d\n",j+1);
               }
           }
           else if(i==1){
               if(H[j]==-1){
                   printf("H %d\n",j+1);
               }
           }
           else if(i==2){
               if(C[j]==-1){
                   printf("C %d\n",j+1);
               }
           }
           else if(i==3){
               if(D[j]==-1){
                   printf("D %d\n",j+1);
               }
           }
       }
   }
   print("Jjj");
   printf("\n");
}






Compiler output:
a.cc: In function 'int main()':
a.cc:54:4: error: 'print' was not declared in this scope; did you mean 'printf'?
   54 |    print("Jjj");
      |    ^~~~~
      |    printf
Language: C++

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

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

for(int i=0;i<n;i++){
int num;
string mark;
cin>>mark>>num;
int card[100][100];
int g;
if (mark=="S") {g=1;}
if (mark=="H") {g=2;}
if (mark=="C") {g=3;}
if (mark=="D") {g=4;}
card[g][num]=1;
}

string str[5]{"G","S","H","C","D"}
for(int x=1;x<=4;x++){
for(int h=1;h<=13;h++){

	if(card[x][h]=1)continue;
	else{
	cout<<str[x]<<" "<<h<<endl;
	}

}
}


return 0;
}


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

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

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

for(int i=0;i<n;i++){
int num;
string mark;
cin>>mark>>num;
int card[100][100];
int g;
if (mark=="S") {g=1;}
if (mark=="H") {g=2;}
if (mark=="C") {g=3;}
if (mark=="D") {g=4;}
card[g][num]=1;
}

string str[5]={"G","S","H","C","D"};
for(int x=1;x<=4;x++){
for(int y=1;y<=13;y++){

	if(card[x][y]==1){continue;}
	else{
	cout<<str[x]<<" "<<y<<endl;
	}

}
}


return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:25:12: error: 'card' was not declared in this scope
   25 |         if(card[x][y]==1){continue;}
      |            ^~~~
Language: C++

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

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

    int card[4][13] = [];
    for (int i =0 ;i<n;i++){
         string suit;
         int num;
         cin >> suit>>num;
         

         if (suit == "S") card[0][num-1] = 1;
         if (suit == "H") card[1][num-1] = 1;
         if (suit == "C") card[1][num-1] = 1;
         if (suit == "D") card[3][num-1] = 1;
     }

     string str[4] = {"S","H","C","D"};
     for (int i =0;i<4;i++){
          for (int j =0;j<13;j++){
              if (card[i][j] ==1) continue;
               cout<<str[i]<<" "j+1<<endl;
          }
     }

      return 0;
}


Compiler output:
a.cc: In lambda function:
a.cc:9:25: error: expected '{' before ';' token
    9 |     int card[4][13] = [];
      |                         ^
a.cc: In function 'int main()':
a.cc:9:23: error: array must be initialized with a brace-enclosed initializer
    9 |     int card[4][13] = [];
      |                       ^~
a.cc:26:30: error: unable to find string literal operator 'operator""j' with 'const char [2]', 'long unsigned int' arguments
   26 |                cout<<str[i]<<" "j+1<<endl;
      |                              ^~~~
Language: C++

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

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

    int card[4][13] = {};
    for (int i =0 ;i<n;i++){
         string suit;
         int num;
         cin >> suit>>num;
         

         if (suit == "S") card[0][num-1] = 1;
         if (suit == "H") card[1][num-1] = 1;
         if (suit == "C") card[1][num-1] = 1;
         if (suit == "D") card[3][num-1] = 1;
     }

     string str[4] = {"S","H","C","D"};
     for (int i =0;i<4;i++){
          for (int j =0;j<13;j++){
              if (card[i][j] ==1) continue;
               cout<<str[i]<<" "j+1<<endl;
          }
     }

      return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:26:30: error: unable to find string literal operator 'operator""j' with 'const char [2]', 'long unsigned int' arguments
   26 |                cout<<str[i]<<" "j+1<<endl;
      |                              ^~~~
Language: C++

/*
 * ITP1_6_B.cpp
 *
 *  Created on: Apr 20, 2018
 *      Author: 13743
 */

#include<iostream>

using namespace std;

int toNum(char s) {
	if(s == 'S') return 0;
	if(s == 'H') return 1;
	if(s == 'C') return 2;
	if(s == 'D') return 3;
	return 0;
}

int main() {
	bool cards[4][13] = {};
	int n;
	cin >> n;
	for(int i=0; i<n; i++) {
		char s = cin;
		int r = cin;
		cards[toNum(s)][r] = true;
	}
	for(int i=0; i<13; i++) {
		if(cards[0][i] == false) {
			cout << "S " << i;
		}
	}
	for(int i=0; i<13; i++) {
		if(cards[1][i] == false) {
			cout << "H " << i;
		}
	}
	for(int i=0; i<13; i++) {
		if(cards[2][i] == false) {
			cout << "C " << i;
		}
	}
	for(int i=0; i<13; i++) {
		if(cards[3][i] == false) {
			cout << "D " << i;
		}
	}
}



Compiler output:
a.cc: In function 'int main()':
a.cc:25:26: error: cannot convert 'std::istream' {aka 'std::basic_istream<char>'} to 'char' in initialization
   25 |                 char s = cin;
      |                          ^~~
      |                          |
      |                          std::istream {aka std::basic_istream<char>}
a.cc:26:25: error: cannot convert 'std::istream' {aka 'std::basic_istream<char>'} to 'int' in initialization
   26 |                 int r = cin;
      |                         ^~~
      |                         |
      |                         std::istream {aka std::basic_istream<char>}
Language: C++

#include<iostream>
using namespace std;
int main()c{
	int cards[4][13]={};
	int n;
	cin>>n;
	for(int i=0;i<n;i++){
		char c;int a;
		cin>>c>>a;
		for(int j=0;j=n;j++){
		if(c=='S'){
			cards[0][a]=1;}
		else if(c=='H'){
			cards[1][a]=1;}
		else if(c=='C'){
			cards[2][a]=1;}
		else {
			cards[3][a]=1;}		
	}
	for(int k=0;k<n;k++){
		if(cards[0][k]=0){
			cout<<"S "<<k<<endl;}
		else if(cards[1][k]=0){
			cout<<"H "<<k<<endl;}
		else if(cards[2][k]=0){
			cout<<"C "<<k<<endl;}
		else {
			cout<<"D "<<k<<endl;}
}		
	return 0;
}}




Compiler output:
a.cc:3:11: error: expected initializer before 'c'
    3 | int main()c{
      |           ^
Language: C++

/**
 * FindingMissingCards.cpp
 * Create:20180421
 * Description:トランプの不足カードを出力する。
 */
#include <iostream>
#include <array>

const int CARDS = 13;
const std::string CARD_SPADE = "S";
const std::string CARD_CLUB = "C";
const std::string CARD_HEART = "H";
const std::string CARD_DIAMOND = "D";

/**
 * カード情報クラス
 */
class Card {
private:
  std::string handle;
  int number;
  bool check;
public:
  /**
   * デフォルトコンストラクタ
   */
  Card(){
    this->handle = "";
    this->number = 0;
    check = false;
  }

  /**
   * コンストラクタ
   * @param handle 柄
   * @param number 数値
   */
  Card(const std::string &handle, int number){
    this->handle = handle;
    this->number = number;
    check = false;
  }

  /**
   * 同じものを見つけた場合　ステータスを変更する
   * @param  handle 柄
   * @param  number 番号
   */
  void set_check(const std::string &handle, int number){
    if (this->handle == handle && this->number == number) {
      check = true;
    }
  }

  /**
   * ゲった
   * @return 現在のステータス
   */
  bool get_check(){
    return check;
  }

  std::string to_string(){
    return handle + " " + std::to_string(number);
  }
};

int main(int argc, char* argv[]){
  // 本来存在するはずのカードのリストを作成する。
  std::array<Card, CARDS * 4> cards;
  std::string handles[] = {CARD_SPADE, CARD_CLUB, CARD_HEART, CARD_DIAMOND};

  for (int i = 0; i < 4; i++){
    for (int j = 0; j < CARDS; j++){
      cards[(j + 1) + (i * CARDS) - 1] = Card(handles[i], j + 1);
    }
  }

  // 情報を入力する
  int cardCount;
  std::string handle;
  int number;

  std::cin >> cardCount;

  for (int i = 0; i < cardCount; i++){
    std::cin >> handle >> number;
    for (int j = 0; j < CARDS * 4; j++){
      cards[j].set_check(handle, number);
    }
  }

  // 情報を出力する。
  for (Card c: cards){
    if (c.get_check){
      std::cout << c.to_string() << std::endl;
    }
  }

  return 0;
}


Compiler output:
a.cc: In function 'int main(int, char**)':
a.cc:95:20: error: cannot convert 'Card::get_check' from type 'bool (Card::)()' to type 'bool'
   95 |     if (c.get_check){
      |                    ^
Language: C++

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

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

  int card[4][13] = {};
  for(int i=0;i<n;i++)
    string suit;
  int num;
  cin>>suit>>num;

  if(suit == "S") card[0][num-1] = 1;
  if(suit == "H") card[1][num-1] = 1;
  if(suit == "C") card[2][num-1] = 1;
  if(suit == "D") card[3][num-1] = 1;
}

string str[4] = {"S", "H" , "S", "D"};
for(int i=0;i<4;i++){
  for(int j=0;j<13j++){
    if(card[i][j] == 1) continue;
    cout<<str[i]" "<<j+1<<endl;
  }
 }

return 0;

}



Compiler output:
a.cc: In function 'int main()':
a.cc:12:8: error: 'suit' was not declared in this scope
   12 |   cin>>suit>>num;
      |        ^~~~
a.cc: At global scope:
a.cc:21:1: error: expected unqualified-id before 'for'
   21 | for(int i=0;i<4;i++){
      | ^~~
a.cc:21:13: error: 'i' does not name a type
   21 | for(int i=0;i<4;i++){
      |             ^
a.cc:21:17: error: 'i' does not name a type
   21 | for(int i=0;i<4;i++){
      |                 ^
a.cc:28:1: error: expected unqualified-id before 'return'
   28 | return 0;
      | ^~~~~~
a.cc:30:1: error: expected declaration before '}' token
   30 | }
      | ^
Language: C++

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

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

  int card[4][13] = {};
  for(int i=0;i<n;i++)
    string suit;
  int num;
  cin>>suit>>num;

  if(suit == "S") card[0][num-1] = 1;
  if(suit == "H") card[1][num-1] = 1;
  if(suit == "C") card[2][num-1] = 1;
  if(suit == "D") card[3][num-1] = 1;
}

string str[4] = {"S", "H", "S", "D"};
for(int i=0;i<4;i++){
  for(int j=0;j<13j++){
    if(card[i][j] == 1) continue;
    cout<<str[i]" "<<j+1<<endl;
  }
 }

return 0;

}



Compiler output:
a.cc: In function 'int main()':
a.cc:12:8: error: 'suit' was not declared in this scope
   12 |   cin>>suit>>num;
      |        ^~~~
a.cc: At global scope:
a.cc:21:1: error: expected unqualified-id before 'for'
   21 | for(int i=0;i<4;i++){
      | ^~~
a.cc:21:13: error: 'i' does not name a type
   21 | for(int i=0;i<4;i++){
      |             ^
a.cc:21:17: error: 'i' does not name a type
   21 | for(int i=0;i<4;i++){
      |                 ^
a.cc:28:1: error: expected unqualified-id before 'return'
   28 | return 0;
      | ^~~~~~
a.cc:30:1: error: expected declaration before '}' token
   30 | }
      | ^
Language: C++

#include<iostream>
using namespace std;
int main(){
  bool cards[4][14];
  int n,rank;
  char suit;
  for(int s=0;s<4;s++){
    for(int r=1;r<=13r++;){
      cards[s][r]=0;
    }
  }cin>>n;
  for(int i=0;i<n;i++){
    cin>>suit>>rank;
    if(suit=='S') cards[0][rank]=1;
    if(suit=='H') cards[1][rank]=1;
    if(suit=='C') cards[2][rank]=1;
    if(suit=='D') cards[3][rank]=1;
  }
  for(int s=0;s<4;s++){
    for(int r=1;r<=13;r++){
      if(cards[s][r]) continue;
      if(s==0)suit='S';
      if(s==1)suit='H';
      if(s==2)suit='C';
      if(s==3)suit='D';
      cout<<suit<<" "<<r<<endl;
    }
  } return 0;
}



Compiler output:
a.cc:8:5: warning: large fixed-point constant implicitly truncated to fixed-point type [-Woverflow]
    8 |     for(int r=1;r<=13r++;){
      |     ^~~
a.cc: In function 'int main()':
a.cc:8:20: error: fixed-point types not supported in C++
    8 |     for(int r=1;r<=13r++;){
      |                    ^~~
Language: C++

#include<iostream>
using namespace std;
int main(){
  bool cards[4][14];
  int n,rank;
  char suit;
  for(int s=0;s<4;s++){
    for(int r=1;r<=13;r++;){
      cards[s][r]=0;
    }
  }cin>>n;
  for(int i=0;i<n;i++){
    cin>>suit>>rank;
    if(suit=='S') cards[0][rank]=1;
    if(suit=='H') cards[1][rank]=1;
    if(suit=='C') cards[2][rank]=1;
    if(suit=='D') cards[3][rank]=1;
  }
  for(int s=0;s<4;s++){
    for(int r=1;r<=13;r++){
      if(cards[s][r]) continue;
      if(s==0)suit='S';
      if(s==1)suit='H';
      if(s==2)suit='C';
      if(s==3)suit='D';
      cout<<suit<<" "<<r<<endl;
    }
  } return 0;
}



Compiler output:
a.cc: In function 'int main()':
a.cc:8:26: error: expected ')' before ';' token
    8 |     for(int r=1;r<=13;r++;){
      |        ~                 ^
      |                          )
a.cc:8:27: error: expected primary-expression before ')' token
    8 |     for(int r=1;r<=13;r++;){
      |                           ^
Language: C++

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

int main()
{
	int n;
	cin>>n;
	char x;
	int r;
	int a[4][13];
	int i,j;
	for(int g=0;g<n;g++){
		cin>>x>>r;
		if(x==S)i=0
		if(x==H)i=1
		if(x==C)i=2
		if(x==D)i=3
		j=r-1
		a[i][j]=true
		}
for(int t=0;t<13;t++){
	if(a[0][t]==false)cout<<S<<""<<t+1<<endl;
	}
for(int t=0;t<13;t++){
	if(a[1][t]==false)cout<<H<<""<<t+1<<endl;
	}
for(int t=0;t<13;t++){
	if(a[2][t]==false)cout<<C<<""<<t+1<<endl;
	}
for(int t=0;t<13;t++){
	if(a[3][t]==false)cout<<D<<""<<t+1<<endl;
	}
	return 0;
	}


Compiler output:
a.cc: In function 'int main()':
a.cc:15:23: error: 'S' was not declared in this scope
   15 |                 if(x==S)i=0
      |                       ^
a.cc:15:28: error: expected ';' before 'if'
   15 |                 if(x==S)i=0
      |                            ^
      |                            ;
   16 |                 if(x==H)i=1
      |                 ~~          
a.cc:23:33: error: 'S' was not declared in this scope
   23 |         if(a[0][t]==false)cout<<S<<""<<t+1<<endl;
      |                                 ^
a.cc:26:33: error: 'H' was not declared in this scope
   26 |         if(a[1][t]==false)cout<<H<<""<<t+1<<endl;
      |                                 ^
a.cc:29:33: error: 'C' was not declared in this scope
   29 |         if(a[2][t]==false)cout<<C<<""<<t+1<<endl;
      |                                 ^
a.cc:32:33: error: 'D' was not declared in this scope
   32 |         if(a[3][t]==false)cout<<D<<""<<t+1<<endl;
      |                                 ^
Language: C++

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

int main()
{
	int n;
	cin>>n;
	char x;
	int r;
	int a[4][13];
	int i,j;
	for(int g=0;g<n;g++){
		cin>>x>>r;
		if(x=="S")i=0;
		if(x=="H")i=1;
		if(x=="C")i=2;
		if(x=="D")i=3;
		j=r-1;
		a[i][j]=true;
		}
for(int t=0;t<13;t++){
	if(a[0][t]==false)cout<<"S "<<t+1<<endl;
	}
for(int t=0;t<13;t++){
	if(a[1][t]==false)cout<<"H "<<t+1<<endl;
	}
for(int t=0;t<13;t++){
	if(a[2][t]==false)cout<<"C "<<t+1<<endl;
	}
for(int t=0;t<13;t++){
	if(a[3][t]==false)cout<<"D "<<t+1<<endl;
	}
	return 0;
	}



Compiler output:
a.cc: In function 'int main()':
a.cc:15:21: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   15 |                 if(x=="S")i=0;
      |                    ~^~~~~
a.cc:16:21: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   16 |                 if(x=="H")i=1;
      |                    ~^~~~~
a.cc:17:21: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   17 |                 if(x=="C")i=2;
      |                    ~^~~~~
a.cc:18:21: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   18 |                 if(x=="D")i=3;
      |                    ~^~~~~
Language: C++

import java.lang.reflect.Array;
import java.math.BigDecimal;
import java.util.*;
import java.util.stream.Stream;

public class Main {
    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        List<String> list = new LinkedList<>();
        String[] array = {"S ", "H ", "C ", "D "};

        for(String a: array){
            for(int i=1; i<=13; i++){
                list.add(String.format("%s%d", a, i));
            }
        }

        System.out.println(array);

        int num = sc.nextInt();

        for(int i=0; i<num; i++){
            String line = sc.next();
            String line2 = sc.next();

            line = line + " " + line2;

            if(list.contains(line)){
                list.remove(list.indexOf(line));
            }
        }

        list.forEach(System.out::println);
    }
}



Compiler output:
a.cc:1:1: error: 'import' does not name a type
    1 | import java.lang.reflect.Array;
      | ^~~~~~
a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:2:1: error: 'import' does not name a type
    2 | import java.math.BigDecimal;
      | ^~~~~~
a.cc:2:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:3:1: error: 'import' does not name a type
    3 | import java.util.*;
      | ^~~~~~
a.cc:3:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:4:1: error: 'import' does not name a type
    4 | import java.util.stream.Stream;
      | ^~~~~~
a.cc:4:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:6:1: error: expected unqualified-id before 'public'
    6 | public class Main {
      | ^~~~~~
Language: C++

import java.lang.reflect.Array;
import java.math.BigDecimal;
import java.util.*;
import java.util.stream.Stream;

public class Main {
    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        List<String> list = new LinkedList<>();
        String[] array = {"S", "H", "C", "D"};

        for(String a: array){
            for(int i=1; i<=13; i++){
                list.add(String.format("%s %d", a, i));
            }
        }

        System.out.println(array);

        int num = sc.nextInt();

        for(int i=0; i<num; i++){
            String line = sc.next();
            String line2 = sc.next();

            line = line + " " + line2;

            if(list.contains(line)){
                list.remove(list.indexOf(line));
            }
        }

        for(String i: list){
            System.out.println(i);
        }
    }
}



Compiler output:
a.cc:1:1: error: 'import' does not name a type
    1 | import java.lang.reflect.Array;
      | ^~~~~~
a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:2:1: error: 'import' does not name a type
    2 | import java.math.BigDecimal;
      | ^~~~~~
a.cc:2:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:3:1: error: 'import' does not name a type
    3 | import java.util.*;
      | ^~~~~~
a.cc:3:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:4:1: error: 'import' does not name a type
    4 | import java.util.stream.Stream;
      | ^~~~~~
a.cc:4:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:6:1: error: expected unqualified-id before 'public'
    6 | public class Main {
      | ^~~~~~
Language: C++

#include<iostream>
using namespace std;
int main(){
int n;
cin>>n;
int r[4][13];

for(int i=0;i<=3;i++){
 for(int j=0;j<=12;j++){
  r[i][j]=0;
 }
}

for(int k=0;k<n;k++){
string a;
int b;
cin >>a>>b;
if(a == "S"){
r[0][b]=1;
}else if(a =="H"){
r[1][b]=1;
}else if(a =="C"){
r[2][b]=1;
}else if(a =="D"){
r[3][b]=1;
}
}

for(int l=0;l<3;l++){
 for(int m=0;m<12;m++){
  if(a[l][m] == 1){
   if(l == 0){
    cout<<"S"<<m+1;
   }else if(l == 1){
    cout<<"H"<<m+1;
   }else if(l == 2){
    cout<<"C"<<m+1;
   }else if(l == 3){
    cout<<"D"<<m+1;
   }
  }
 }
}

}

   


Compiler output:
a.cc: In function 'int main()':
a.cc:31:6: error: 'a' was not declared in this scope
   31 |   if(a[l][m] == 1){
      |      ^
Language: C++

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

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

	bool spade[13] = { false };
	bool hart[13] = { false };
	bool club[13] = { false };
	bool diamond[13] = { false };


	for (int i = 0; i < count; i++)
	{
		string mark;
		int no;

		cin >> mark >> no;
		int no_minus = no - 1;
		
		if (mark == "S") spade[no_minus] = true;
		if (mark == "H") hart[no_minus] = true;
		if (mark == "C") club[no_minus] = true;
		if (mark == "D") diamond[no_minus] = true;
	}
	for (int i = 0; i < 13; i++)
	{
		if (!spade[i]) cout << "S " << i + 1 << endl;
	}
	for (int i = 0; i < 13; i++)
	{
		if (!hart[i]) cout << "H " << i + 1 << endl;
	}
	for (int i = 0; i < 13; i++)
	{
		if (!club[i]) cout << "C " << i + 1 << endl;
	}
	for (int i = 0; i < 13; i++)
	{
		if (!diamond[i]) cout << "D " << i + 1 << endl;
	}
}


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

#include<stdio.h>

int main(void) {
	char cardtype[4] = { 'S','H','C','D' };				//
	char card[4][13] = {};								//絵柄*数字の2次配列
	char type;											//
	int num = 0, i = 0, j = 0, cardnum;
	printf("太郎が持っているカードの総数:");
	scanf_s("%d", &num);
	getchar();											//改行コードの読み飛ばし
	printf("太郎が持っているカードを１枚ずつ入力してください。\n");
	do{
		printf("spade=S,heart=H,club=C,diamond=D(残り%d枚):", num - i);
		scanf_s("%c", &type, 1);						//絵柄の取得
		scanf_s("%d", &cardnum);						//数字の取得
		getchar();										//改行コードの読み飛ばし
		switch (type) {
		case 'S':
			if (card[0][cardnum - 1] == 1) {			//重複の場合
				printf("重複しています。\n");
				break;
			}
			if (cardnum > 0 && cardnum < 14) {
				card[0][cardnum - 1] = 1;
				i++;
			}
			break;
		case 'H':
			if (card[1][cardnum - 1] == 1) {			//重複の場合
				printf("重複しています。\n");
				break;
			}
			if (cardnum > 0 && cardnum < 14) {
				card[1][cardnum - 1] = 1;
				i++;
			}
			break;
		case 'C':
			if (card[2][cardnum - 1] == 1) {			//重複の場合
				printf("重複しています。\n");
				break;
			}
			if (cardnum > 0 && cardnum < 14) {
				card[2][cardnum - 1] = 1;
				i++;
			}
			break;
		case 'D':
			if (card[3][cardnum - 1] == 1) {			//重複の場合
				printf("重複しています。\n");
				break;
			}
			if(cardnum > 0 && cardnum < 14){
				card[3][cardnum - 1] = 1;
				i++;
			}
			break;
		}
	} while (i != num);									//手持ち枚数分繰り返す
	printf("足りないカードは以下の通りです。\n");
	for (i = 0; i < 4; i++) {
		for (j = 0; j < 13; j++) {
			if (card[i][j] == 0) {
				printf("%c %d\n",cardtype[i],j + 1);
			}
		}
	}
	return 0;
}


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

#include<stdio.h>

int main() {
	char cardtype[4] = { 'S','H','C','D' };				//
	char card[4][13] = {};								//絵柄*数字の2次配列
	char type;											//
	int num = 0, i = 0, j = 0, cardnum;
	printf("太郎が持っているカードの総数:");
	scanf_s("%d", &num);
	getchar();											//改行コードの読み飛ばし
	printf("太郎が持っているカードを１枚ずつ入力してください。\n");
	do{
		printf("spade=S,heart=H,club=C,diamond=D(残り%d枚):", num - i);
		scanf_s("%c", &type, 1);						//絵柄の取得
		scanf_s("%d", &cardnum);						//数字の取得
		getchar();										//改行コードの読み飛ばし
		switch (type) {
		case 'S':
			if (cardnum > 0 && cardnum < 14) {			//有効範囲の場合
				if (card[0][cardnum - 1] == 1) {		//重複の場合
					printf("重複しています。\n");
					break;
				}
				card[0][cardnum - 1] = 1;
				i++;
			}
			else {										//有効範囲外の場合
				printf("不正な値です。\n");
			}
			break;
		case 'H':
			if (cardnum > 0 && cardnum < 14) {			//有効範囲の場合
				if (card[1][cardnum - 1] == 1) {		//重複の場合
					printf("重複しています。\n");
					break;
				}
				card[1][cardnum - 1] = 1;
				i++;
			}
			else {										//有効範囲外の場合
				printf("不正な値です。\n");
			}
			break;
		case 'C':
			if (cardnum > 0 && cardnum < 14) {			//有効範囲の場合
				if (card[2][cardnum - 1] == 1) {		//重複の場合
					printf("重複しています。\n");
					break;
				}
				card[2][cardnum - 1] = 1;
				i++;
			}
			else {										//有効範囲外の場合
				printf("不正な値です。\n");
			}
			break;
		case 'D':
			if (cardnum > 0 && cardnum < 14) {			//有効範囲の場合
				if (card[3][cardnum - 1] == 1) {		//重複の場合
					printf("重複しています。\n");
					break;
				}
				card[3][cardnum - 1] = 1;
				i++;
			}
			else {										//有効範囲外の場合
				printf("不正な値です。\n");
			}
			break;
		}
	} while (i != num);									//手持ち枚数分繰り返す
	printf("足りないカードは以下の通りです。\n");
	for (i = 0; i < 4; i++) {
		for (j = 0; j < 13; j++) {
			if (card[i][j] == 0) {
				printf("%c %d\n",cardtype[i],j + 1);
			}
		}
	}
	return 0;
}


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


#include<cstdio>

int main(){
    int n;
    scanf("%d",&n);
    bool card[4][13];
    for(int i = 0; i < 4; i++){
        for(int j = 0; j <13; j++){
            card[i][j] = false;
        }
    }
    for(int i = 0; i < n; i++){
        char c;
        scanf("\n%c",&c);
        int x;
        scanf("%d",&x);
        if(c == 'S'){
            card[0][x] = true;
        }
        else if(c == 'H'){
            card[1][x] = true;
        }
        else if(c == 'C'){
            card[2][x] = true;
        }
        else(c == 'D'){
            card[3][x] = true;
        }
    }
    for(int i = 0; i < 4; i++){
        for(int j = 0; j < 13; j++){
            if(card[i][j] == false){
                if(i == 0){
                    printf("S %d",j+1);
                }
                else if(i == 1){
                    printf("H %d",j+1);
                }
                else if(i == 2){
                    printf("C %d",j+1);
                }
                else(i == 3){
                    printf("D %d",j+1);
                }
                printf("\n");
            }
        }
    }
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:27:23: error: expected ';' before '{' token
   27 |         else(c == 'D'){
      |                       ^
      |                       ;
a.cc:43:29: error: expected ';' before '{' token
   43 |                 else(i == 3){
      |                             ^
      |                             ;
Language: C++

#include <cstdio>
#include<cmath>
int main(){
    int l;
    scanf("%d",&l);

    bool a[4][13];
    for(int i = 0;i < 4;i++){
        for(int j = 0;j < 13;j++){
            a[i][j] = false;
        }
    }

    for(int i = 0;i < l;++){
        char c;
        scanf("%c",&c);
        
        int x;
        scanf("%d",&x);
        
        if(c == 'S'){
            a[0][x - 1] = true;
        }
        else if(c == 'H'){
             a[1][x - 1] = true;
        }
        else if(c == 'C'){
             a[2][x - 1] = true;
        }
        else if(c == 'D'){
             a[3][x - 1] = true;
        }
    }
    
    
    for(int i = 0;i < 4;i++){
        for(int j = 0;j < 13;j++){
            if(a[i][j] == false){ 
                if(i == 0){
                    printf("S %d\n",j+1);
                }
                else if(i == 1){
                    printf("H %d\n",j+1);
                }
                else if(i == 2){
                    printf("C %d\n",j+1);
                }
                else if(i == 3){
                    printf("D %d\n",j+1);
                }
            }
        }
        
    }

    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:14:27: error: expected primary-expression before ')' token
   14 |     for(int i = 0;i < l;++){
      |                           ^
Language: C++

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

int main(){
           int n;
           cin>>n;
           int a[4][13];
           for(int x=0;x<n;x++){
           string str;
           int number;
           cin>>str>>number;
    
           if(str=="S") a[0][number-1] = 1;
           if(str=="H") a[1][number-1] = 1;
           if(str=="C") a[2][number-1] = 1;
           if(str=="D") a[3][number-1] = 1;
           }
        
           string str2[4] = {"S","H","C","D"};
           for(int i=0;i<4;i++){
                for(int j=0;j<13;j++){
                    if(a[i][j] == 1) continue;
                    cout<<str2[i]<<" "<<j+1<<endl;
           }
     return 0;
}


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

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

int main(){
           int n;
           cin>>n;
           int a[4][13];
           for(int x=0;x<n;x++){
           string str;
           int number;
           cin>>str>>number;
    
           if(str=="S") a[0][number-1] = 1;
           if(str=="H") a[1][number-1] = 1;
           if(str=="C") a[2][number-1] = 1;
           if(str=="D") a[3][number-1] = 1;
           }
        
           string str2[4] = {"S","H","C","D"};
           for(int i=0;i<4;i++){
                for(int j=0;j<13;j++){
                    if(str[i][j] == 1) continue;
                    cout<<str2[i]<<" "<<j+1<<endl;
                }
           }
     return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:22:24: error: 'str' was not declared in this scope; did you mean 'str2'?
   22 |                     if(str[i][j] == 1) continue;
      |                        ^~~
      |                        str2
Language: C++

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

int main(){
           int n;
           cin>>n;
           int a[4][13] = {};
           for(int x=0;x<n;x++){
           string str;
           int number;
           cin>>str>>number;
    
           if(str="S") a[0][number-1] = 1;
           if(str="H") a[1][number-1] = 1;
           if(str="C") a[2][number-1] = 1;
           if(str="D") a[3][number-1] = 1;
           }
        
           string str2[4] = {"S","H","C","D"};
           for(int i=0;i<4;i++){
                for(int j=0;j<13;j++){
                    if(a[i][j] == 1) continue;
                    cout<<str2[i]<<" "<<j+1<<endl;
                }
           }
     return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:13:18: error: could not convert 'str.std::__cxx11::basic_string<char>::operator=(((const char*)"S"))' from 'std::__cxx11::basic_string<char>' to 'bool'
   13 |            if(str="S") a[0][number-1] = 1;
      |               ~~~^~~~
      |                  |
      |                  std::__cxx11::basic_string<char>
a.cc:14:18: error: could not convert 'str.std::__cxx11::basic_string<char>::operator=(((const char*)"H"))' from 'std::__cxx11::basic_string<char>' to 'bool'
   14 |            if(str="H") a[1][number-1] = 1;
      |               ~~~^~~~
      |                  |
      |                  std::__cxx11::basic_string<char>
a.cc:15:18: error: could not convert 'str.std::__cxx11::basic_string<char>::operator=(((const char*)"C"))' from 'std::__cxx11::basic_string<char>' to 'bool'
   15 |            if(str="C") a[2][number-1] = 1;
      |               ~~~^~~~
      |                  |
      |                  std::__cxx11::basic_string<char>
a.cc:16:18: error: could not convert 'str.std::__cxx11::basic_string<char>::operator=(((const char*)"D"))' from 'std::__cxx11::basic_string<char>' to 'bool'
   16 |            if(str="D") a[3][number-1] = 1;
      |               ~~~^~~~
      |                  |
      |                  std::__cxx11::basic_string<char>