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

#include <stdio.h>

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

Compiler output:
a.cc: In function 'int main()':
a.cc:6:19: error: expected ';' before ')' token
    6 |   for(i=0,i<13,i++){
      |                   ^
      |                   ;
a.cc:12:3: error: expected primary-expression before 'while'
   12 |   while(n!=0){
      |   ^~~~~
a.cc:11:17: error: expected ')' before 'while'
   11 |   scanf("%d",n);
      |                 ^
      |                 )
   12 |   while(n!=0){
      |   ~~~~~          
a.cc:6:6: note: to match this '('
    6 |   for(i=0,i<13,i++){
      |      ^
a.cc:13:25: error: expected ';' before 'if'
   13 |     scanf("%s %d",&d,&x)
      |                         ^
      |                         ;
   14 |     if(d=='S'){
      |     ~~                   
a.cc:16:7: error: 'else' without a previous 'if'
   16 |     } else if(d=='H'){
      |       ^~~~
Language: C++

#include <stdio.h>

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

Compiler output:
a.cc: In function 'int main()':
a.cc:6:19: error: expected ';' before ')' token
    6 |   for(i=0,i<13,i++){
      |                   ^
      |                   ;
a.cc:12:3: error: expected primary-expression before 'while'
   12 |   while(n!=0){
      |   ^~~~~
a.cc:11:17: error: expected ')' before 'while'
   11 |   scanf("%d",n);
      |                 ^
      |                 )
   12 |   while(n!=0){
      |   ~~~~~          
a.cc:6:6: note: to match this '('
    6 |   for(i=0,i<13,i++){
      |      ^
Language: C++

#include <stdio.h>

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

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

#include <stdio.h>

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

Compiler output:
a.cc: In function 'int main()':
a.cc:17:18: error: expected ';' before '}' token
   17 |       a[x-1][1]=1
      |                  ^
      |                  ;
   18 |     } else if(d=='C'){
      |     ~
Language: C++

#include <stdio.h>

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

Compiler output:
a.cc: In function 'int main()':
a.cc:14:19: error: expected ';' before 'if'
   14 |     scanf("%d",&x)
      |                   ^
      |                   ;
   15 |     if(d=='S'){
      |     ~~             
a.cc:17:7: error: 'else' without a previous 'if'
   17 |     } else if(d=='H'){
      |       ^~~~
a.cc:28:12: error: 'l' was not declared in this scope
   28 |         if(l==0){
      |            ^
a.cc:40:12: error: expected '}' at end of input
   40 |   return 0;
      |            ^
a.cc:3:11: note: to match this '{'
    3 | int main(){
      |           ^
Language: C++

#include <iostream>

int main() {
  const int rankNum = 52;
  const int suitNum = 4
  int n;
  std::cin >> n;

  bool isRank[suitNum][rankNum] = false;

  char suitbuf;
  int rankbuf;
  for(int i = 0; i < n; ++i) {
    std::cin >> suitbuf >> rankbuf;
    switch (suitbuf) {
      case 'S':
        isRank[0][rankbuf] = true;
        break;
      case 'H':
        isRank[1][rankbuf] = true;
        break;
      case 'C':
        isRank[2][rankbuf] = true;
        break;
      case 'D':
        isRank[3][rankbuf] = true;
        break;
    }
  }

  for(int i = 0; i < suitNum; ++i) {
    for(int j = 0; j < rankNum; ++j) {
      if(!isRank[i][j]) {
        switch (i) {
          case 0:
            std::cout << "S " << j << std::endl;
            break;
          case 1:
            std::cout << "H " << j << std::endl;
            break;
          case 2:
            std::cout << "C " << j << std::endl;
            break;
          case 3:
            std::cout << "D " << j << std::endl;
            break;
        }
      }
    }
  }

  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:3: error: expected ',' or ';' before 'int'
    6 |   int n;
      |   ^~~
a.cc:7:15: error: 'n' was not declared in this scope
    7 |   std::cin >> n;
      |               ^
a.cc:9:35: error: array must be initialized with a brace-enclosed initializer
    9 |   bool isRank[suitNum][rankNum] = false;
      |                                   ^~~~~
Language: C++

#include <iostream>

int main() {
  const int rankNum = 52;
  const int suitNum = 4;
  int n;
  std::cin >> n;

  bool isRank[suitNum][rankNum] = false;

  char suitbuf;
  int rankbuf;
  for(int i = 0; i < n; ++i) {
    std::cin >> suitbuf >> rankbuf;
    switch (suitbuf) {
      case 'S':
        isRank[0][rankbuf] = true;
        break;
      case 'H':
        isRank[1][rankbuf] = true;
        break;
      case 'C':
        isRank[2][rankbuf] = true;
        break;
      case 'D':
        isRank[3][rankbuf] = true;
        break;
    }
  }

  for(int i = 0; i < suitNum; ++i) {
    for(int j = 0; j < rankNum; ++j) {
      if(!isRank[i][j]) {
        switch (i) {
          case 0:
            std::cout << "S " << j << std::endl;
            break;
          case 1:
            std::cout << "H " << j << std::endl;
            break;
          case 2:
            std::cout << "C " << j << std::endl;
            break;
          case 3:
            std::cout << "D " << j << std::endl;
            break;
        }
      }
    }
  }

  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:35: error: array must be initialized with a brace-enclosed initializer
    9 |   bool isRank[suitNum][rankNum] = false;
      |                                   ^~~~~
Language: C++

#include<iostream>
using namespace std;

int ITP1_6_B() {
	int n;
	int cards[4][13] = {};

	char suit;
	int temp;

	cin >> n;

	for (int i = 0; i < n; i++) {
		cin >> suit;

		switch (suit) {
		case 'S':
			cin >> temp;
			cards[0][temp-1] = 1;
			break;
		case 'H':
			cin >> temp;
			cards[1][temp-1] = 1;
			break;
		case 'C':
			cin >> temp;
			cards[2][temp-1] = 1;
			break;
		case 'D':
			cin >> temp;
			cards[3][temp-1] = 1;
			break;
		}
	}

	for (int i = 0; i < 4; i++) {
		for (int j = 0; j < 13; j++) {
			switch (i) {
			case 0:
				if (cards[i][j] != 1) {
					printf("S %d\n", j + 1);
				}
				break;
			case 1:
				if (cards[i][j] != 1) {
					printf("H %d\n", j + 1);
				}
				break;
			case 2:
				if (cards[i][j] != 1) {
					printf("C %d\n", j + 1);
				}
				break;
			case 3:
				if (cards[i][j] != 1) {
					printf("D %d\n", j + 1);
				}
				break;
			}
		}
	}

	return 0;
}

Compiler output:
/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/14/../../../x86_64-linux-gnu/Scrt1.o: in function `_start':
(.text+0x17): undefined reference to `main'
collect2: error: ld returned 1 exit status
Language: C++

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

vector<string> searchNonCards(map<char, vector<int>> input_cards);

int main(int argc, char *argv[])
{
    int n;
    cin >> n;

    map<char, vector<int>> cards;

    char mark;
    int num;
    for (int i = 0; i < n; i++)
    {
        cin >> mark >> num;
        cards.insert(make_pair(mark, num));
    }

    vector<string> non_cards = searchNonCards(cards);

    for (string card : non_cards)
    {
        cout << card << endl;
    }

    return 0;
}

vector<string> searchNonCards(map<char, vector<int>> input_cards)
{
    vector<string> non_cards;
    char marks[4] = {'S', 'H', 'C', 'D'};
    for (char mark : marks)
    {
        for (int i = 1; i <= 13; i++)
        {
            auto result = find(input_cards[mark].begin(), input_cards[mark].end(), i);
            if (result == input_cards[mark].end())
            {
                string buff = {mark};
                non_cards.push_back(buff + " " + to_string(i));
            }
        }
    }

    return non_cards;
}

Compiler output:
a.cc: In function 'std::vector<std::__cxx11::basic_string<char> > searchNonCards(std::map<char, std::vector<int> >)':
a.cc:42:31: error: no matching function for call to 'find(std::vector<int>::iterator, std::vector<int>::iterator, int&)'
   42 |             auto result = find(input_cards[mark].begin(), input_cards[mark].end(), i);
      |                           ~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/c++/14/bits/locale_facets.h:48,
                 from /usr/include/c++/14/bits/basic_ios.h:37,
                 from /usr/include/c++/14/ios:46,
                 from /usr/include/c++/14/ostream:40,
                 from /usr/include/c++/14/iostream:41,
                 from a.cc:1:
/usr/include/c++/14/bits/streambuf_iterator.h:435:5: note: candidate: 'template<class _CharT2> typename __gnu_cxx::__enable_if<std::__is_char<_CharT2>::__value, std::istreambuf_iterator<_CharT> >::__type std::find(istreambuf_iterator<_CharT>, istreambuf_iterator<_CharT>, const _CharT2&)'
  435 |     find(istreambuf_iterator<_CharT> __first,
      |     ^~~~
/usr/include/c++/14/bits/streambuf_iterator.h:435:5: note:   template argument deduction/substitution failed:
a.cc:42:31: note:   '__gnu_cxx::__normal_iterator<int*, std::vector<int> >' is not derived from 'std::istreambuf_iterator<_CharT>'
   42 |             auto result = find(input_cards[mark].begin(), input_cards[mark].end(), i);
      |                           ~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Language: C++

import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import java.util.Scanner;

public class Main{

	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		int n = scan.nextInt();
		if (n <= 52) {
			List<String> list = new ArrayList<String>(n);
			for (int i = 0; i <= n; i++) {
				String str = scan.nextLine();
				list.add(str);
			}
			List<Integer> S = new ArrayList<>();
			List<Integer> H = new ArrayList<>();
			List<Integer> C = new ArrayList<>();
			List<Integer> D = new ArrayList<>();
			List<Integer> parent = Arrays.asList(new Integer[] { 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13 });
			List<Integer> s = new ArrayList<>(parent);
			List<Integer> h = new ArrayList<>(parent);
			List<Integer> c = new ArrayList<>(parent);
			List<Integer> d = new ArrayList<>(parent);
			for (int i = 0; i < list.size(); i++) {
				if (list.get(i).startsWith("S")) {
					S.add(Integer.parseInt(list.get(i).replaceAll("[^0-9] ", "")));
				} else if (list.get(i).startsWith("H")) {
					H.add(Integer.parseInt(list.get(i).replaceAll("[^0-9] ", "")));
				} else if (list.get(i).startsWith("C")) {
					C.add(Integer.parseInt(list.get(i).replaceAll("[^0-9] ", "")));
				} else if (list.get(i).startsWith("D")) {
					D.add(Integer.parseInt(list.get(i).replaceAll("[^0-9] ", "")));
				}
			}
			s.removeAll(S);
			h.removeAll(H);
			c.removeAll(C);
			d.removeAll(D);
			S.clear();
			H.clear();
			C.clear();
			D.clear();
			list.clear();
			if (s.size() != 0) {
				for (int diff : s) {
					list.add("S " + String.valueOf(diff));
				}
			}
			if (h.size() != 0) {
				for (int diff : h) {
					list.add("H " + String.valueOf(diff));
				}
			}
			if (c.size() != 0) {
				for (int diff : c) {
					list.add("C " + String.valueOf(diff));
				}
			}
			if (d.size() != 0) {
				for (int diff : d) {
					list.add("D " + String.valueOf(diff));
				}
			}
			s.clear();
			h.clear();
			c.clear();
			d.clear();
			for (String str : list) {
				System.out.println(str);
			}
		}
	}
}

Compiler output:
a.cc:1:1: error: 'import' does not name a type
    1 | import java.util.ArrayList;
      | ^~~~~~
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.util.Arrays;
      | ^~~~~~
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.List;
      | ^~~~~~
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.Scanner;
      | ^~~~~~
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>
#include <string>
#include <cstring>
using namespace std;

int main()
{
  int size=13;
  int spade[size], = {} heart[size], = {} club[size], = {} diamond[size];

  int maxn;
  cin >> maxn;

  for( int i = 0; i < maxn; i++ ) {
    string suits = "";
    int num = 0;

    cin >> suits >> num;

    if( suits == "S" ) {   spade[ num - 1 ] = 1; }
    if( suits == "H" ) {   heart[ num - 1 ] = 1; }
    if( suits == "C" ) {    club[ num - 1 ] = 1; }
    if( suits == "D" ) { diamond[ num - 1 ] = 1; }
  }

  for( int j = 0; j < size; j++ ) {
    if( spade[ j ] == 0 ) {   cout << "S " << j + 1 << endl;  }
  }
  for( int j = 0; j < size; j++ ) {
    if( heart[ j ] == 0 ) {   cout << "H " << j + 1 << endl;  }
  }
  for( int j = 0; j < size; j++ ) {
    if( club[ j ] == 0 ) {    cout << "C " << j + 1 << endl;  }
  }
  for( int j = 0; j < size; j++ ) {
    if( diamond[ j ] == 0 ) { cout << "D " << j + 1 << endl;  }
  }

  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:20: error: expected unqualified-id before '=' token
    9 |   int spade[size], = {} heart[size], = {} club[size], = {} diamond[size];
      |                    ^
a.cc:9:25: error: 'heart' was not declared in this scope
    9 |   int spade[size], = {} heart[size], = {} club[size], = {} diamond[size];
      |                         ^~~~~
a.cc:9:38: error: expected primary-expression before '=' token
    9 |   int spade[size], = {} heart[size], = {} club[size], = {} diamond[size];
      |                                      ^
a.cc:9:60: error: 'diamond' was not declared in this scope
    9 |   int spade[size], = {} heart[size], = {} club[size], = {} diamond[size];
      |                                                            ^~~~~~~
a.cc:22:29: error: 'club' was not declared in this scope
   22 |     if( suits == "C" ) {    club[ num - 1 ] = 1; }
      |                             ^~~~
a.cc:33:9: error: 'club' was not declared in this scope
   33 |     if( club[ j ] == 0 ) {    cout << "C " << j + 1 << endl;  }
      |         ^~~~
Language: C++

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

int main()
{
  int size=13;
  int spade[13] = { 0 }, heart[13] = { 0 }, club[13] = { 0 }, diamond[13] = { 0

  int maxn;
  cin >> maxn;

  for( int i = 0; i < maxn; i++ ) {
    string suits = "";
    int num = 0;

    cin >> suits >> num;

    if( suits == "S" ) {   spade[ num - 1 ] = 1; }
    if( suits == "H" ) {   heart[ num - 1 ] = 1; }
    if( suits == "C" ) {    club[ num - 1 ] = 1; }
    if( suits == "D" ) { diamond[ num - 1 ] = 1; }
  }

  for( int j = 0; j < size; j++ ) {
    if( spade[ j ] == 0 ) {   cout << "S " << j + 1 << endl;  }
  }
  for( int j = 0; j < size; j++ ) {
    if( heart[ j ] == 0 ) {   cout << "H " << j + 1 << endl;  }
  }
  for( int j = 0; j < size; j++ ) {
    if( club[ j ] == 0 ) {    cout << "C " << j + 1 << endl;  }
  }
  for( int j = 0; j < size; j++ ) {
    if( diamond[ j ] == 0 ) { cout << "D " << j + 1 << endl;  }
  }

  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:11:3: error: expected '}' before 'int'
   11 |   int maxn;
      |   ^~~
a.cc:9:77: note: to match this '{'
    9 |   int spade[13] = { 0 }, heart[13] = { 0 }, club[13] = { 0 }, diamond[13] = { 0
      |                                                                             ^
a.cc:11:3: error: expected ',' or ';' before 'int'
   11 |   int maxn;
      |   ^~~
a.cc:12:10: error: 'maxn' was not declared in this scope; did you mean 'main'?
   12 |   cin >> maxn;
      |          ^~~~
      |          main
Language: C++

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

vector<string> searchNonCards(map<char, vector<int>> input_cards);
void removeNumber(vector<int> v, int num);

int main(int argc, char *argv[])
{
    map<char, vector<int>> cards;
    vector<char> marks = {'S', 'H', 'C', 'D'};
    for (char c : marks)
    {
        vector<int> v = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13};
        cards.insert(make_pair(c, v));
    }

    int input_num = 0;
    cin >> input_num;

    char m;
    int n;
    for (int i = 0; i < input_num; i++)
    {
        cin >> m >> n;
        cards[m].erase(remove(cards[m].begin(), cards[m].end(), n), cards[m].end());
    }

    for (char c : marks)
    {
        for (int i : cards[c])
        {
            cout << c << " " << i << endl;
        }
    }

    return 0;
}

Compiler output:
a.cc: In function 'int main(int, char**)':
a.cc:28:45: error: cannot convert 'std::vector<int>::iterator' to 'const char*'
   28 |         cards[m].erase(remove(cards[m].begin(), cards[m].end(), n), cards[m].end());
      |                               ~~~~~~~~~~~~~~^~
      |                                             |
      |                                             std::vector<int>::iterator
In file included from /usr/include/c++/14/cstdio:42,
                 from /usr/include/c++/14/ext/string_conversions.h:45,
                 from /usr/include/c++/14/bits/basic_string.h:4154,
                 from /usr/include/c++/14/string:54,
                 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,
                 from /usr/include/c++/14/ostream:40,
                 from /usr/include/c++/14/iostream:41,
                 from a.cc:1:
/usr/include/stdio.h:158:32: note:   initializing argument 1 of 'int remove(const char*)'
  158 | extern int remove (const char *__filename) __THROW;
      |                    ~~~~~~~~~~~~^~~~~~~~~~
Language: C++

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

int main(int argc, char *argv[])
{
    map<char, vector<int>> cards;
    vector<char> marks = {'S', 'H', 'C', 'D'};
    for (char c : marks)
    {
        vector<int> v = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13};
        cards.insert(make_pair(c, v));
    }

    int input_num = 0;
    cin >> input_num;

    char m;
    int n;
    for (int i = 0; i < input_num; i++)
    {
        cin >> m >> n;
        cards[m].erase(remove(cards[m].begin(), cards[m].end(), n), cards[m].end());
    }

    for (char c : marks)
    {
        for (int i : cards[c])
        {
            cout << c << " " << i << endl;
        }
    }

    return 0;
}

Compiler output:
a.cc: In function 'int main(int, char**)':
a.cc:25:45: error: cannot convert 'std::vector<int>::iterator' to 'const char*'
   25 |         cards[m].erase(remove(cards[m].begin(), cards[m].end(), n), cards[m].end());
      |                               ~~~~~~~~~~~~~~^~
      |                                             |
      |                                             std::vector<int>::iterator
In file included from /usr/include/c++/14/cstdio:42,
                 from /usr/include/c++/14/ext/string_conversions.h:45,
                 from /usr/include/c++/14/bits/basic_string.h:4154,
                 from /usr/include/c++/14/string:54,
                 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,
                 from /usr/include/c++/14/ostream:40,
                 from /usr/include/c++/14/iostream:41,
                 from a.cc:1:
/usr/include/stdio.h:158:32: note:   initializing argument 1 of 'int remove(const char*)'
  158 | extern int remove (const char *__filename) __THROW;
      |                    ~~~~~~~~~~~~^~~~~~~~~~
Language: C++

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

int main(int argc, char *argv[])
{
    map<char, vector<int>> cards;
    vector<char> marks = {'S', 'H', 'C', 'D'};
    for (char c : marks)
    {
        vector<int> v = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13};
        cards.insert(make_pair(c, v));
    }

    int input_num = 0;
    cin >> input_num;

    char m;
    int n;
    for (int i = 0; i < input_num; i++)
    {
        cin >> m >> n;
        (cards[m]).erase(remove((cards[m]).begin(), (cards[m]).end(), n), (cards[m]).end());
    }

    for (char c : marks)
    {
        for (int i : cards[c])
        {
            cout << c << " " << i << endl;
        }
    }

    return 0;
}

Compiler output:
a.cc: In function 'int main(int, char**)':
a.cc:25:49: error: cannot convert 'std::vector<int>::iterator' to 'const char*'
   25 |         (cards[m]).erase(remove((cards[m]).begin(), (cards[m]).end(), n), (cards[m]).end());
      |                                 ~~~~~~~~~~~~~~~~^~
      |                                                 |
      |                                                 std::vector<int>::iterator
In file included from /usr/include/c++/14/cstdio:42,
                 from /usr/include/c++/14/ext/string_conversions.h:45,
                 from /usr/include/c++/14/bits/basic_string.h:4154,
                 from /usr/include/c++/14/string:54,
                 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,
                 from /usr/include/c++/14/ostream:40,
                 from /usr/include/c++/14/iostream:41,
                 from a.cc:1:
/usr/include/stdio.h:158:32: note:   initializing argument 1 of 'int remove(const char*)'
  158 | extern int remove (const char *__filename) __THROW;
      |                    ~~~~~~~~~~~~^~~~~~~~~~
Language: C++

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

int main(int argc, char *argv[])
{
    map<char, vector<int>> cards;
    vector<char> marks = {'S', 'H', 'C', 'D'};
    for (char c : marks)
    {
        vector<int> v = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13};
        cards.insert(make_pair(c, v));
    }

    int input_num = 0;
    cin >> input_num;

    char m;
    int n;
    for (int i = 0; i < input_num; i++)
    {
        cin >> m >> n;
        vector<int> v = cards[m];
        v.erase(remove(v.begin(), v.end(), n), v.end());
        cards[m] = v;
    }

    for (char c : marks)
    {
        for (int i : cards[c])
        {
            cout << c << " " << i << endl;
        }
    }

    return 0;
}

Compiler output:
a.cc: In function 'int main(int, char**)':
a.cc:26:31: error: cannot convert 'std::vector<int>::iterator' to 'const char*'
   26 |         v.erase(remove(v.begin(), v.end(), n), v.end());
      |                        ~~~~~~~^~
      |                               |
      |                               std::vector<int>::iterator
In file included from /usr/include/c++/14/cstdio:42,
                 from /usr/include/c++/14/ext/string_conversions.h:45,
                 from /usr/include/c++/14/bits/basic_string.h:4154,
                 from /usr/include/c++/14/string:54,
                 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,
                 from /usr/include/c++/14/ostream:40,
                 from /usr/include/c++/14/iostream:41,
                 from a.cc:1:
/usr/include/stdio.h:158:32: note:   initializing argument 1 of 'int remove(const char*)'
  158 | extern int remove (const char *__filename) __THROW;
      |                    ~~~~~~~~~~~~^~~~~~~~~~
Language: C++

#include<stdio.h>
int main(void){
	int S[14] = { 0 };
	int H[14] = { 0 };
	int C[14] = { 0 };
	int D[14] = { 0 };
	int n;
	char card;
	int number;
	scanf_s("%d", &n);
	for (int count = 1; count <= n; count++){
		scanf("%s", &card);
		scanf("%d", &number);
		if (card == S){
			S[number] = 1;
		}
		else if (card == H){
			H[number] = 1;
		}
		else if (card == C){
			C[number] == 1;
		}
		else if (card == D){
			D[number] = 1;
		}
	}
	for (int check = 1; check <= 14; check++){
		if (S[check] == 0){
			printf("S %d\n", check);
		}
	}
	for (int check = 1; check <= 14; check++){
		if (H[check] == 0){
			printf("H %d\n", check);
		}
	}
	for (int check = 1; check <= 14; check++){
		if (C[check] == 0){
			printf("C %d\n", check);
		}
	}
	for (int check = 1; check <= 14; check++){
		if (D[check] == 0){
			printf("D %d\n", check);
		}
	}
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:9: error: 'scanf_s' was not declared in this scope; did you mean 'scanf'?
   10 |         scanf_s("%d", &n);
      |         ^~~~~~~
      |         scanf
a.cc:14:26: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   14 |                 if (card == S){
      |                     ~~~~~^~~~
a.cc:17:31: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   17 |                 else if (card == H){
      |                          ~~~~~^~~~
a.cc:20:31: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   20 |                 else if (card == C){
      |                          ~~~~~^~~~
a.cc:23:31: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   23 |                 else if (card == D){
      |                          ~~~~~^~~~
Language: C++

#include<stdio.h>
int main(void){
	int S[14] = { 0 };
	int H[14] = { 0 };
	int C[14] = { 0 };
	int D[14] = { 0 };
	int n;
	char card;
	int number;
	scanf("%d", &n);
	for (int count = 1; count <= n; count++){
		scanf("%s", &card);
		scanf("%d", &number);
		if (card == S){
			S[number] = 1;
		}
		else if (card == H){
			H[number] = 1;
		}
		else if (card == C){
			C[number] == 1;
		}
		else if (card == D){
			D[number] = 1;
		}
	}
	for (int check = 1; check <= 14; check++){
		if (S[check] == 0){
			printf("S %d\n", check);
		}
	}
	for (int check = 1; check <= 14; check++){
		if (H[check] == 0){
			printf("H %d\n", check);
		}
	}
	for (int check = 1; check <= 14; check++){
		if (C[check] == 0){
			printf("C %d\n", check);
		}
	}
	for (int check = 1; check <= 14; check++){
		if (D[check] == 0){
			printf("D %d\n", check);
		}
	}
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:14:26: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   14 |                 if (card == S){
      |                     ~~~~~^~~~
a.cc:17:31: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   17 |                 else if (card == H){
      |                          ~~~~~^~~~
a.cc:20:31: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   20 |                 else if (card == C){
      |                          ~~~~~^~~~
a.cc:23:31: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   23 |                 else if (card == D){
      |                          ~~~~~^~~~
Language: C++

#include<stdio.h>
#include<math.h>
#include<algorithm>

int main()
{
	int x[5][14] = { 0 };

	int n;
	char S;
	int s;
	int u;

	scanf_s("%d", &n);

	int m = 1;
	
	while(m<=2*n){
		scanf("%c %d",&S,&s);
		switch (S) {
		case'S':u = 1;
			break;
		case'H':u = 2;
			break;
		case'C':u = 3;
			break;
		case'D':u = 4;
			break;
		}
		x[u][s] = 1;
		m++;
		
	}

	for (int i = 1; i <= 4; i++) {
		for (int j = 1; j <= 13; j++) {
			if (x[i][j] == 0) {
				switch (i) {
				case 1:S = 'S';
					break;
				case 2:S = 'H';
					break;
				case 3:S = 'C';
					break;
				case 4:S = 'D';
					break;
				}
				printf("%c %d\n", S, j);
			}
		}
	}
	return 0;
}

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

#include <iostream>

using namespace std;

int main() {
 bool spade[13] = { false }, heart[13] = { false }, club[13] = { false }, diamond[13] = { false };
 int having, n;
 char mark;

 cin >> having;

 for(int i = 0;i < having;i++) {
  cin >> mark >> n;

  switch(mark) {
   case 'S':
    spade[n - 1] = true;
    break;
   case 'H':
    heart[n - 1] = true;
    break;
   case 'C':
    club[n - 1] = true;
    break;
   case 'D':
    diamond[n - 1] = true;
    break;
  }

  for(int i = 0;i < 13;i++) {
   if(!spade[i])
    cout << "S " << i - 1 << endl;
  }

  for(int i = 0;i < 13;i++) {
   if(!heart[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;
  }

  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:51:2: error: expected '}' at end of input
   51 | }
      |  ^
a.cc:5:12: note: to match this '{'
    5 | 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 = 0; r <= 13; r++) {
			cards[s][r] = 0;
		}
	}
	cin >> n;
	for (int i = 0; i < n; i++) {
		cin >> suit >> rank;
		if (suit == 0) cards[0][rank] = 1;
		if (suit == 1) cards[1][rank] = 1;
		if (suit == 2) cards[2][rank] = 1;
		if (suit == 3) cards[3][rank] = 1;
	}

	for (int i = 0; i < 4; i++) {
		for (int j = 0; j < 14; j++) {
			if (cards[i][j] == 1) continue;
			if (i == 0) suit = 'S';
			if (i == 1) suit = 'H';
			if (i == 2) suit = 'C';
			if (i == 3) suit = 'D';
			cout << suit << ' ' << j << endl;
			}
		}
	}

	return 0;
}



Compiler output:
a.cc:35:9: error: expected unqualified-id before 'return'
   35 |         return 0;
      |         ^~~~~~
a.cc:36:1: error: expected declaration before '}' token
   36 | }
      | ^
Language: C++

#include <iostream>
using namespace std;

int main() {
string suit;
int count = 0;
int num;
cin >> num;
string deck[52] = {}

for (int i = 0 ; i < 4; i++) {
for (int j = 1; j < 14; j++) {
if (i == 0 ) {
suit = "H";
} else if (i == 1) {
suit = "S";
} else if (i == 2) {
suit = "D"
} else {
suit = "C"
}deck[count] = suit + j;
count++;}
}
string p;
for (int i = 0; i < num; i++) {
int found = 1;
cin.getLine(line, p);
for (int j = 0; j < 52; j++) {
if (deck[j] == p) {
found = 0;
}
} if (found == 1) {
cout << p << " ";
} cout << endl;
}




Compiler output:
a.cc: In function 'int main()':
a.cc:11:1: error: expected ',' or ';' before 'for'
   11 | for (int i = 0 ; i < 4; i++) {
      | ^~~
a.cc:11:18: error: 'i' was not declared in this scope
   11 | for (int i = 0 ; i < 4; i++) {
      |                  ^
a.cc:27:5: error: 'std::istream' {aka 'class std::basic_istream<char>'} has no member named 'getLine'; did you mean 'getline'?
   27 | cin.getLine(line, p);
      |     ^~~~~~~
      |     getline
a.cc:27:13: error: 'line' was not declared in this scope
   27 | cin.getLine(line, p);
      |             ^~~~
a.cc:35:2: error: expected '}' at end of input
   35 | }
      |  ^
a.cc:4:12: note: to match this '{'
    4 | int main() {
      |            ^
Language: C++

#include <iostream>
using namespace std;

int main() {
string suit;
int count = 0;
int num;
cin >> num;
string deck[52] = {};

for (int i = 0 ; i < 4; i++) {
for (int j = 1; j < 14; j++) {
string z = j;
if (i == 0 ) {
suit = "H";
} else if (i == 1) {
suit = "S";
} else if (i == 2) {
suit = "D";
} else {
suit = "C";
}deck[count] = suit + z;
count++;}
}
string p;
for (int i = 0; i < num; i++) {
int found = 1;
cin.getLine(line, p);
for (int j = 0; j < 52; j++) {
if (deck[j] == p) {
found = 0;
}
} if (found == 1) {
cout << p << " ";
}} cout << endl;
}




Compiler output:
a.cc: In function 'int main()':
a.cc:13:12: error: conversion from 'int' to non-scalar type 'std::string' {aka 'std::__cxx11::basic_string<char>'} requested
   13 | string z = j;
      |            ^
a.cc:28:5: error: 'std::istream' {aka 'class std::basic_istream<char>'} has no member named 'getLine'; did you mean 'getline'?
   28 | cin.getLine(line, p);
      |     ^~~~~~~
      |     getline
a.cc:28:13: error: 'line' was not declared in this scope
   28 | cin.getLine(line, p);
      |             ^~~~
Language: C++

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

int main() {
string suit;
int count = 0;
int num;
cin >> num;
string deck[52] = {};

for (int i = 0 ; i < 4; i++) {
for (int j = 1; j < 14; j++) {
string z = to_string(j);
if (i == 0 ) {
suit = "H";
} else if (i == 1) {
suit = "S";
} else if (i == 2) {
suit = "D";
} else {
suit = "C";
}deck[count] = suit + z;
count++;}
}
string p;
for (int i = 0; i < num; i++) {
int found = 1;
cin.getLine(line, p);
for (int j = 0; j < 52; j++) {
if (deck[j] == p) {
found = 0;
}
} if (found == 1) {
cout << p << " ";
}} cout << endl;
}




Compiler output:
a.cc: In function 'int main()':
a.cc:29:5: error: 'std::istream' {aka 'class std::basic_istream<char>'} has no member named 'getLine'; did you mean 'getline'?
   29 | cin.getLine(line, p);
      |     ^~~~~~~
      |     getline
a.cc:29:13: error: 'line' was not declared in this scope
   29 | cin.getLine(line, p);
      |             ^~~~
Language: C++

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

int main() {
string suit;
int count = 0;
int num;
cin >> num;
string deck[52] = {};

for (int i = 0 ; i < 4; i++) {
for (int j = 1; j < 14; j++) {
string z = to_string(5);
if (i == 0 ) {
suit = "H";
} else if (i == 1) {
suit = "S";
} else if (i == 2) {
suit = "D";
} else {
suit = "C";
}deck[count] = suit + z;
count++;}
}
string p;
for (int i = 0; i < num; i++) {
int found = 1;
cin.getLine(line, p);
for (int j = 0; j < 52; j++) {
if (deck[j] == p) {
found = 0;
}
} if (found == 1) {
cout << p << " ";
}} cout << endl;
}




Compiler output:
a.cc: In function 'int main()':
a.cc:29:5: error: 'std::istream' {aka 'class std::basic_istream<char>'} has no member named 'getLine'; did you mean 'getline'?
   29 | cin.getLine(line, p);
      |     ^~~~~~~
      |     getline
a.cc:29:13: error: 'line' was not declared in this scope
   29 | cin.getLine(line, p);
      |             ^~~~
Language: C++

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

int main() {
string suit;
int count = 0;
int num;
cin >> num;
string deck[52] = {};

for (int i = 0 ; i < 4; i++) {
for (int j = 1; j < 14; j++) {
stringstream ss;
ss << j;
string str = ss.str();
if (i == 0 ) {
suit = "H";
} else if (i == 1) {
suit = "S";
} else if (i == 2) {
suit = "D";
} else {
suit = "C";
}deck[count] = suit + str;
count++;}
}
string p;
for (int i = 0; i < num; i++) {
int found = 1;
cin.getLine(line, p);
for (int j = 0; j < 52; j++) {
if (deck[j] == p) {
found = 0;
}
} if (found == 1) {
cout << p << " ";
}} cout << endl;
}




Compiler output:
a.cc: In function 'int main()':
a.cc:14:14: error: aggregate 'std::stringstream ss' has incomplete type and cannot be defined
   14 | stringstream ss;
      |              ^~
a.cc:31:5: error: 'std::istream' {aka 'class std::basic_istream<char>'} has no member named 'getLine'; did you mean 'getline'?
   31 | cin.getLine(line, p);
      |     ^~~~~~~
      |     getline
a.cc:31:13: error: 'line' was not declared in this scope
   31 | cin.getLine(line, p);
      |             ^~~~
Language: C++

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

int main() {
string suit;
int count = 0;
int num;
cin >> num;
string deck[52] = {};

for (int i = 0 ; i < 4; i++) {
for (int j = 1; j < 14; j++) {
stringstream ss;
ss << j;
string str = ss.str();
if (i == 0 ) {
suit = "H";
} else if (i == 1) {
suit = "S";
} else if (i == 2) {
suit = "D";
} else {
suit = "C";
}deck[count] = suit + str;
count++;}
}
string p;
for (int i = 0; i < num; i++) {
int found = 1;
getLine(cin, p);
for (int j = 0; j < 52; j++) {
if (deck[j] == p) {
found = 0;
}
} if (found == 1) {
cout << p << " ";
}} cout << endl;
}




Compiler output:
a.cc: In function 'int main()':
a.cc:14:14: error: aggregate 'std::stringstream ss' has incomplete type and cannot be defined
   14 | stringstream ss;
      |              ^~
a.cc:31:1: error: 'getLine' was not declared in this scope; did you mean 'getline'?
   31 | getLine(cin, p);
      | ^~~~~~~
      | getline
Language: C++

#include<iostream>
#include <iomanip>
#include <math.h>
using namespace std;
int main(){
  int x[52] = {0};
  char t;
  cin >> n;
  
  for(int i=0;i<n;i++){
    cin >> t >> n;

    if(t=='S'){
      x[n] = 1;
    }else if(t=='H'){
      x[n+12] = 1;
    }else if(t=='C'){
      x[n+25] = 1;
    }else if(t=='D'){
      x[n+38] = 1;
    }else{}

  }


  for(int i=0;i<52;i++){
    if(x[i]!=1)continue;
    if(i < 13){
      cout << "S " << (i+1) << endl;
    }else if(i<26){
      cout << "H " << (i+1-13) << endl;
    }else if(i<39){
      cout << "C " << (i+1-26) << endl;
    }else if(i<52){
      cout << "D " << (i+1-39) << endl;
    }else{}
  }

}



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

#include<iostream>
using namespace std;
int main()
{
	int S[13], H[13], C[13], D[13];
	memset(S, 0, sizeof(int) * 13);
	memset(H, 0, sizeof(int) * 13);
	memset(C, 0, sizeof(int) * 13);
	memset(D, 0, sizeof(int) * 13);

	char n;
	int index, num;
	cin >> num;
	for (int i = 0; i < num; i++)
	{
		cin >> n >> index;
		switch (n)
		{
		case 'S':
			S[index - 1] = 1;
		case 'H':
			H[index - 1] = 1;
		case 'C':
			C[index - 1] = 1;
		case 'D':
			D[index - 1] = 1;
		}
	}
	for (int i = 0; i < 13; i++)
		if (S[i] != 0)
			cout << "S " << i + 1 << endl;

	for (int i = 0; i < 13; i++)
		if (H[i] != 0)
			cout << "H " << i + 1 << endl;

	for (int i = 0; i < 13; i++)
		if (C[i] != 0)
			cout << "C " << i + 1 << endl;

	for (int i = 0; i < 13; i++)
		if (D[i] != 0)
			cout << "D " << i + 1 << endl;
	return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:6:9: error: 'memset' was not declared in this scope
    6 |         memset(S, 0, sizeof(int) * 13);
      |         ^~~~~~
a.cc:2:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
    1 | #include<iostream>
  +++ |+#include <cstring>
    2 | using namespace std;
Language: C++

#include <bits/stdc++.h>

int main(){
    int n,m;
    char suit,suits[4]={'S','H','C','D'};
    int cards[4][13] = {0};
    
    scanf("%d",&n);
    
    for(int i = 0;i<n;i++){
        scanf("%c %d",&suit,&m);
        for(int j = 0; j< 4; j++){
            if(suit == suits[j])cards[j][m] = 1;
        }
    }
    for(int i = 0;j<4;j++){
        for(int j = 0;j<13;j++){
            if(!cards[i][j])printf("%c %d\n",suits[i],j);
        }
    }
    return 0;
}


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

#include <stdio.h>

int main(){
    int n,num;
    char mark;
    bool cards[4][14];
    
    for(int s=0;s<4;s++){
        for(int r=1;r<=13;r++){
            cards[s][r]=0;
        }    
    }
    scanf("%d",&n);
    for(int k=0;k<n;k++){
            scanf("%s %d",&mark,&num);
            if(mark=='S') cards[0][num]=1;
            if(mark=='H') cards[1][num]=1;
            if(mark=='C') cards[2][num]=1;
            if(mark=='D') cards[3][num]=1;
    }
    for(int s=0;s<4;s++){
        for(int r=1;r<=13;r++){
            if(cards[s][r]) continue;
            if(s==0) mark='S';
            if(s==1) mark='H';
            if(s==2) mark='C';
            if(s==3) mark='D';
            printf("%c %d\n",mark,r);
        }
    }


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

#include<iostream>
using namespace std;

int main(void){
	bool a[4][13]};
	int n,b;
	char ch,mark[4]={S,H,C,D};
	cin>>n;
	for(int i=0;i<n;i++){
		cin>>ch>>b;
		if(ch=='S')a[0][b]=true;
		else if(ch=='H')a[1][b]=true;
		else if(ch=='C')a[2][b]=true;
		else if(ch=='D')a[3][b]=true;
	}
	
	for(int i=0;i<4;i++){
		for(int j=1;j<14;j++){
			if(a[i][j]==false&&i==0)cout<<mark[i]<<" "<<j<<endl; 
		}
	}
}


Compiler output:
a.cc: In function 'int main()':
a.cc:5:22: error: expected initializer before '}' token
    5 |         bool a[4][13]};
      |                      ^
a.cc: At global scope:
a.cc:7:26: error: 'S' was not declared in this scope
    7 |         char ch,mark[4]={S,H,C,D};
      |                          ^
a.cc:7:28: error: 'H' was not declared in this scope
    7 |         char ch,mark[4]={S,H,C,D};
      |                            ^
a.cc:7:30: error: 'C' was not declared in this scope
    7 |         char ch,mark[4]={S,H,C,D};
      |                              ^
a.cc:7:32: error: 'D' was not declared in this scope
    7 |         char ch,mark[4]={S,H,C,D};
      |                                ^
a.cc:8:9: error: 'cin' does not name a type
    8 |         cin>>n;
      |         ^~~
a.cc:9:9: error: expected unqualified-id before 'for'
    9 |         for(int i=0;i<n;i++){
      |         ^~~
a.cc:9:21: error: 'i' does not name a type
    9 |         for(int i=0;i<n;i++){
      |                     ^
a.cc:9:25: error: 'i' does not name a type
    9 |         for(int i=0;i<n;i++){
      |                         ^
a.cc:17:9: error: expected unqualified-id before 'for'
   17 |         for(int i=0;i<4;i++){
      |         ^~~
a.cc:17:21: error: 'i' does not name a type
   17 |         for(int i=0;i<4;i++){
      |                     ^
a.cc:17:25: error: 'i' does not name a type
   17 |         for(int i=0;i<4;i++){
      |                         ^
a.cc:22:1: error: expected declaration before '}' token
   22 | }
      | ^
Language: C++

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

int main(void){
	bool a[4][13];
	int n,b;
	char ch,mark[4]={'S','H','C','D'};
	//cin>>n;
	scanf("%d",&n);
	for(int i=0;i<n;i++){
		scanf("%c%d",&ch,&b);
		switch(ch){
			case 'S'
				a[0][b]=true;
				break;
			case 'H'
				a[1][b]=true;
				break;
			case 'C'
				a[2][b]=true;
				break;
			case 'D'
				a[3][b]=true;
				break;
		}
		/*
		//cin>>ch>>b;
		if(ch=='S')a[0][b]=true;
		else if(ch=='H')a[1][b]=true;
		else if(ch=='C')a[2][b]=true;
		else if(ch=='D')a[3][b]=true;
		*/
	}
	
	for(int i=0;i<4;i++){
		for(int j=1;j<14;j++){
			if(a[i][j]==false)cout<<mark[i]<<" "<<j<<endl; 
		}
	}
}


Compiler output:
a.cc: In function 'int main()':
a.cc:14:33: error: expected ':' before 'a'
   14 |                         case 'S'
      |                                 ^
      |                                 :
   15 |                                 a[0][b]=true;
      |                                 ~
a.cc:17:33: error: expected ':' before 'a'
   17 |                         case 'H'
      |                                 ^
      |                                 :
   18 |                                 a[1][b]=true;
      |                                 ~
a.cc:20:33: error: expected ':' before 'a'
   20 |                         case 'C'
      |                                 ^
      |                                 :
   21 |                                 a[2][b]=true;
      |                                 ~
a.cc:23:33: error: expected ':' before 'a'
   23 |                         case 'D'
      |                                 ^
      |                                 :
   24 |                                 a[3][b]=true;
      |                                 ~
Language: C++

#include <iostream>
using namespace std;

int main()
{

	int n;
	//s 0 h 1 c 2 d 3
	bool card[4][52];
	cin >> n;
	char str;
	int number;
	for(int i = 0 ; i < 4; i++)
	{
		for(int j = 0; j < 52 ; j++)
		{
			card[i][j] = false;
		}
	}
	for(int i = 0 ; i < n ; i++)
	{
		cin >> str >> number;
		if(card == "S")
		{
			card[0][number] = true;
		}else if(card == "H")
		{
			card[1][number] = true;
		}else if(card == "C")
		{
			card[2][number] = true;
			
		}else if(card == "D")
		{
			card[3][number] = true;
		}
	}
		for(int i = 0 ; i < 4; i++)
	{
		for(int j = 0; j < 52 ; j++)
		{
			if(card[i][j] == false)
			{
				if(i == 0)
				{
					cout << "S" << " "<< j << endl;
				}else if(i == 1)
				{
					cout << "H" << " "<< j << endl;
				}else if(i == 2)
				{
					cout << "C" << " "<< j << endl;
				}else if(i == 3)
				{
					cout << "D" << " "<< j << endl;
				}
			}
		}
	}
	return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:23:25: error: comparison between distinct pointer types 'bool (*)[52]' and 'const char*' lacks a cast
   23 |                 if(card == "S")
      |                    ~~~~~^~~~~~
a.cc:26:31: error: comparison between distinct pointer types 'bool (*)[52]' and 'const char*' lacks a cast
   26 |                 }else if(card == "H")
      |                          ~~~~~^~~~~~
a.cc:29:31: error: comparison between distinct pointer types 'bool (*)[52]' and 'const char*' lacks a cast
   29 |                 }else if(card == "C")
      |                          ~~~~~^~~~~~
a.cc:33:31: error: comparison between distinct pointer types 'bool (*)[52]' and 'const char*' lacks a cast
   33 |                 }else if(card == "D")
      |                          ~~~~~^~~~~~