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

#include<stdio.h>
#include<algorithm>
#include<iostream>
using namespace std;
struct Card{ char suit, value };

void BubbleSort(struct Card A[],int n){
	Card tmp;
	for (int i = 0; i < n; i++){
		for (int j = n - 1; j >= i; j--){
			if (C[j].value > C[j - 1]){
				tmp = C[j]; C[j] = C[j - 1]; C[j - 1] = tmp;
			}
		}
	}
}

void SelectionSort(struct Card A[],int n){
	Card tmp;
	for (int i = 0; i < n; i++){
		min = i;
		for (int j = i; j < n; j++){
			if (C[j].value < C[min].value){
				min=j
			}
		}
		tmp = C[j]; C[j] = C[j - 1]; C[j - 1] = tmp;
	}
}

void print(Card A[],int n){
	for (int i = 0; i < n; i++){
		if (i != 0)
			cout << " ";
		cout << C[i].suit << C[i].value;
	}
	cout << endl;
}
int main(){
	Card C1[100], C2[100];
	int n;
	char ch;
	cin >> n;
	for (int i = 0; i < n; i++){
		cin >> C1[i].suit >> C1[i].value;
	}
	for (int i = 0; i < n; i++)
		C2[i] = C1[i];
	BubbleSort(C1, n);
	SelectionSort(C2, n);
	print(C1, n);
	cout << "Stable" << endl;
	print(C2, n);
	if (isStable(C1, C2, n)){
		cout << "Stable" << endl;
	}
	else{
		cout << "Not stable" << endl;
	}
	return 0;
}

Compiler output:
a.cc:5:25: error: expected ';' at end of member declaration
    5 | struct Card{ char suit, value };
      |                         ^~~~~
      |                              ;
a.cc: In function 'void BubbleSort(Card*, int)':
a.cc:11:29: error: 'C' was not declared in this scope
   11 |                         if (C[j].value > C[j - 1]){
      |                             ^
a.cc: In function 'void SelectionSort(Card*, int)':
a.cc:21:23: error: overloaded function with no contextual type information
   21 |                 min = i;
      |                       ^
a.cc:23:29: error: 'C' was not declared in this scope
   23 |                         if (C[j].value < C[min].value){
      |                             ^
a.cc:24:37: error: overloaded function with no contextual type information
   24 |                                 min=j
      |                                     ^
a.cc:27:23: error: 'C' was not declared in this scope
   27 |                 tmp = C[j]; C[j] = C[j - 1]; C[j - 1] = tmp;
      |                       ^
a.cc:27:25: error: 'j' was not declared in this scope
   27 |                 tmp = C[j]; C[j] = C[j - 1]; C[j - 1] = tmp;
      |                         ^
a.cc: In function 'void print(Card*, int)':
a.cc:35:25: error: 'C' was not declared in this scope
   35 |                 cout << C[i].suit << C[i].value;
      |                         ^
a.cc: In function 'int main()':
a.cc:54:13: error: 'isStable' was not declared in this scope
   54 |         if (isStable(C1, C2, n)){
      |             ^~~~~~~~
Language: C++

#include<stdio.h>
#include<algorithm>
#include<iostream>
using namespace std;
struct Card{ char suit,value; };

void BubbleSort(struct Card C[],int n){
	Card tmp;
	for (int i = 0; i < n; i++){
		for (int j = n - 1; j >= i; j--){
			if (C[j].value > C[j - 1].value){
				tmp = C[j]; C[j] = C[j - 1]; C[j - 1] = tmp;
			}
		}
	}
}

void SelectionSort(struct Card C[],int n){
	Card tmp;
	for (int i = 0; i < n; i++){
		int min = i;
		for (int j = i; j < n; j++){
			if (C[j].value < C[min].value){
				min=j
			}
		}
		tmp = C[j]; C[j] = C[j - 1]; C[j - 1] = tmp;
	}
}

void print(struct Card C[],int n){
	for (int i = 0; i < n; i++){
		if (i != 0)
			cout << " ";
		cout << C[i].suit << C[i].value;
	}
	cout << endl;
}

bool isStable(struct C1,struct C2,int n){
	for (int i = 0; i < n; i++){
		if (C1[i].suit != C2[i].suit)return false;
	}
	return true;
}

int main(){
	Card C1[100], C2[100];
	int n;
	char ch;
	cin >> n;
	for (int i = 0; i < n; i++){
		cin >> C1[i].suit >> C1[i].value;
	}
	for (int i = 0; i < n; i++)
		C2[i] = C1[i];
	BubbleSort(C1, n);
	SelectionSort(C2, n);
	print(C1, n);
	cout << "Stable" << endl;
	print(C2, n);
	if (isStable(C1, C2, n)){
		cout << "Stable" << endl;
	}
	else{
		cout << "Not stable" << endl;
	}
	return 0;
}

Compiler output:
a.cc: In function 'void SelectionSort(Card*, int)':
a.cc:24:38: error: expected ';' before '}' token
   24 |                                 min=j
      |                                      ^
      |                                      ;
   25 |                         }
      |                         ~             
a.cc:27:25: error: 'j' was not declared in this scope
   27 |                 tmp = C[j]; C[j] = C[j - 1]; C[j - 1] = tmp;
      |                         ^
a.cc: At global scope:
a.cc:40:15: error: '<anonymous>' has incomplete type
   40 | bool isStable(struct C1,struct C2,int n){
      |               ^~~~~~~~~
a.cc:40:22: note: forward declaration of 'struct C1'
   40 | bool isStable(struct C1,struct C2,int n){
      |                      ^~
a.cc:40:25: error: '<anonymous>' has incomplete type
   40 | bool isStable(struct C1,struct C2,int n){
      |                         ^~~~~~~~~
a.cc:40:32: note: forward declaration of 'struct C2'
   40 | bool isStable(struct C1,struct C2,int n){
      |                                ^~
a.cc: In function 'bool isStable(C1, C2, int)':
a.cc:42:23: error: expected unqualified-id before '[' token
   42 |                 if (C1[i].suit != C2[i].suit)return false;
      |                       ^
a.cc: In function 'int main()':
a.cc:62:22: error: parameter 1 of 'bool isStable(C1, C2, int)' has incomplete type 'C1'
   62 |         if (isStable(C1, C2, n)){
      |                      ^~
a.cc:40:15: note:   declared here
   40 | bool isStable(struct C1,struct C2,int n){
      |               ^~~~~~~~~
Language: C++

#include<stdio.h>
#include<algorithm>
#include<iostream>
using namespace std;
struct Card{ char suit,value; };

void BubbleSort(struct Card C[],int n){
	Card tmp;
	for (int i = 0; i < n; i++){
		for (int j = n - 1; j >= i; j--){
			if (C[j].value > C[j - 1].value){
				tmp = C[j]; C[j] = C[j - 1]; C[j - 1] = tmp;
			}
		}
	}
}

void SelectionSort(struct Card C[],int n){
	Card tmp;
	for (int i = 0; i < n; i++){
		int min = i;
		for (int j = i; j < n; j++){
			if (C[j].value < C[min].value){
				min = j;
			}
		}
		tmp = C[j]; C[j] = C[j - 1]; C[j - 1] = tmp;
	}
}

void print(struct Card C[],int n){
	for (int i = 0; i < n; i++){
		if (i != 0)
			cout << " ";
		cout << C[i].suit << C[i].value;
	}
	cout << endl;
}

bool isStable(struct C1,struct C2,int n){
	for (int i = 0; i < n; i++){
		if (C1[i].suit != C2[i].suit)return false;
	}
	return true;
}

int main(){
	Card C1[100], C2[100];
	int n;
	char ch;
	cin >> n;
	for (int i = 0; i < n; i++){
		cin >> C1[i].suit >> C1[i].value;
	}
	for (int i = 0; i < n; i++)
		C2[i] = C1[i];
	BubbleSort(C1, n);
	SelectionSort(C2, n);
	print(C1, n);
	cout << "Stable" << endl;
	print(C2, n);
	if (isStable(C1, C2, n)){
		cout << "Stable" << endl;
	}
	else{
		cout << "Not stable" << endl;
	}
	return 0;
}

Compiler output:
a.cc: In function 'void SelectionSort(Card*, int)':
a.cc:27:25: error: 'j' was not declared in this scope
   27 |                 tmp = C[j]; C[j] = C[j - 1]; C[j - 1] = tmp;
      |                         ^
a.cc: At global scope:
a.cc:40:15: error: '<anonymous>' has incomplete type
   40 | bool isStable(struct C1,struct C2,int n){
      |               ^~~~~~~~~
a.cc:40:22: note: forward declaration of 'struct C1'
   40 | bool isStable(struct C1,struct C2,int n){
      |                      ^~
a.cc:40:25: error: '<anonymous>' has incomplete type
   40 | bool isStable(struct C1,struct C2,int n){
      |                         ^~~~~~~~~
a.cc:40:32: note: forward declaration of 'struct C2'
   40 | bool isStable(struct C1,struct C2,int n){
      |                                ^~
a.cc: In function 'bool isStable(C1, C2, int)':
a.cc:42:23: error: expected unqualified-id before '[' token
   42 |                 if (C1[i].suit != C2[i].suit)return false;
      |                       ^
a.cc: In function 'int main()':
a.cc:62:22: error: parameter 1 of 'bool isStable(C1, C2, int)' has incomplete type 'C1'
   62 |         if (isStable(C1, C2, n)){
      |                      ^~
a.cc:40:15: note:   declared here
   40 | bool isStable(struct C1,struct C2,int n){
      |               ^~~~~~~~~
Language: C++

#include<stdio.h>
#include<algorithm>
#include<iostream>
using namespace std;
struct Card{ char suit,value; };

void BubbleSort(struct Card C[],int n){
	Card tmp;
	for (int i = 0; i < n; i++){
		for (int j = n - 1; j >= i; j--){
			if (C[j].value > C[j - 1].value){
				tmp = C[j]; C[j] = C[j - 1]; C[j - 1] = tmp;
			}
		}
	}
}

void SelectionSort(struct Card C[],int n){
	Card tmp;
	for (int i = 0; i < n; i++){
		int min = i;
		for (int j = i; j < n; j++){
			if (C[j].value < C[min].value){
				min = j;
			}
		}
		tmp = C[i]; C[i] = C[min]; C[min] = tmp;
	}
}

void print(struct Card C[],int n){
	for (int i = 0; i < n; i++){
		if (i != 0)
			cout << " ";
		cout << C[i].suit << C[i].value;
	}
	cout << endl;
}

bool isStable(struct C1,struct C2,int n){
	for (int i = 0; i < n; i++){
		if (C1[i].suit != C2[i].suit)return false;
	}
	return true;
}

int main(){
	Card C1[100], C2[100];
	int n;
	char ch;
	cin >> n;
	for (int i = 0; i < n; i++){
		cin >> C1[i].suit >> C1[i].value;
	}
	for (int i = 0; i < n; i++)
		C2[i] = C1[i];
	BubbleSort(C1, n);
	SelectionSort(C2, n);
	print(C1, n);
	cout << "Stable" << endl;
	print(C2, n);
	if (isStable(C1, C2, n)){
		cout << "Stable" << endl;
	}
	else{
		cout << "Not stable" << endl;
	}
	return 0;
}

Compiler output:
a.cc:40:15: error: '<anonymous>' has incomplete type
   40 | bool isStable(struct C1,struct C2,int n){
      |               ^~~~~~~~~
a.cc:40:22: note: forward declaration of 'struct C1'
   40 | bool isStable(struct C1,struct C2,int n){
      |                      ^~
a.cc:40:25: error: '<anonymous>' has incomplete type
   40 | bool isStable(struct C1,struct C2,int n){
      |                         ^~~~~~~~~
a.cc:40:32: note: forward declaration of 'struct C2'
   40 | bool isStable(struct C1,struct C2,int n){
      |                                ^~
a.cc: In function 'bool isStable(C1, C2, int)':
a.cc:42:23: error: expected unqualified-id before '[' token
   42 |                 if (C1[i].suit != C2[i].suit)return false;
      |                       ^
a.cc: In function 'int main()':
a.cc:62:22: error: parameter 1 of 'bool isStable(C1, C2, int)' has incomplete type 'C1'
   62 |         if (isStable(C1, C2, n)){
      |                      ^~
a.cc:40:15: note:   declared here
   40 | bool isStable(struct C1,struct C2,int n){
      |               ^~~~~~~~~
Language: C++

#include<stdio.h>
#include<algorithm>
#include<iostream>
using namespace std;
struct Card{ char suit,value; };

void BubbleSort(struct Card C[],int n){
	Card tmp;
	for (int i = 0; i < n; i++){
		for (int j = n - 1; j >= i; j--){
			if (C[j].value > C[j - 1].value){
				tmp = C[j]; C[j] = C[j - 1]; C[j - 1] = tmp;
			}
		}
	}
}

void SelectionSort(struct Card C[],int n){
	Card tmp;
	for (int i = 0; i < n; i++){
		int min = i;
		for (int j = i; j < n; j++){
			if (C[j].value < C[min].value){
				min = j;
			}
		}
		tmp = C[i]; C[i] = C[min]; C[min] = tmp;
	}
}

void print(struct Card C[],int n){
	for (int i = 0; i < n; i++){
		if (i != 0)
			cout << " ";
		cout << C[i].suit << C[i].value;
	}
	cout << endl;
}

bool isStable(struct C1[],struct C2[],int n){
	for (int i = 0; i < n; i++){
		if (C1[i].suit != C2[i].suit)return false;
	}
	return true;
}

int main(){
	Card C1[100], C2[100];
	int n;
	char ch;
	cin >> n;
	for (int i = 0; i < n; i++){
		cin >> C1[i].suit >> C1[i].value;
	}
	for (int i = 0; i < n; i++)
		C2[i] = C1[i];
	BubbleSort(C1, n);
	SelectionSort(C2, n);
	print(C1, n);
	cout << "Stable" << endl;
	print(C2, n);
	if (isStable(C1, C2, n)){
		cout << "Stable" << endl;
	}
	else{
		cout << "Not stable" << endl;
	}
	return 0;
}

Compiler output:
a.cc: In function 'bool isStable(C1*, C2*, int)':
a.cc:42:23: error: expected unqualified-id before '[' token
   42 |                 if (C1[i].suit != C2[i].suit)return false;
      |                       ^
a.cc: In function 'int main()':
a.cc:62:22: error: cannot convert 'Card*' to 'C1*'
   62 |         if (isStable(C1, C2, n)){
      |                      ^~
      |                      |
      |                      Card*
a.cc:40:15: note:   initializing argument 1 of 'bool isStable(C1*, C2*, int)'
   40 | bool isStable(struct C1[],struct C2[],int n){
      |               ^~~~~~~~~~~
Language: C++

#include<stdio.h>
#include<algorithm>
#include<iostream>
using namespace std;
struct Card{ char suit,value; };

void BubbleSort(struct Card C[],int n){
	Card tmp;
	for (int i = 0; i < n; i++){
		for (int j = n - 1; j >= i; j--){
			if (C[j].value > C[j - 1].value){
				tmp = C[j]; C[j] = C[j - 1]; C[j - 1] = tmp;
			}
		}
	}
}

void SelectionSort(struct Card C[],int n){
	Card tmp;
	for (int i = 0; i < n; i++){
		int min = i;
		for (int j = i; j < n; j++){
			if (C[j].value < C[min].value){
				min = j;
			}
		}
		tmp = C[i]; C[i] = C[min]; C[min] = tmp;
	}
}

void print(struct Card C[],int n){
	for (int i = 0; i < n; i++){
		if (i != 0)
			cout << " ";
		cout << C[i].suit << C[i].value;
	}
	cout << endl;
}

bool isStable(struct C1[],struct C2[],int n){
	for (int i = 0; i < n; i++){
		if (C1[i].suit != C2[i].suit){
			return false;
		}
	}
	return true;
}

int main(){
	Card C1[100], C2[100];
	int n;
	char ch;
	cin >> n;
	for (int i = 0; i < n; i++){
		cin >> C1[i].suit >> C1[i].value;
	}
	for (int i = 0; i < n; i++)
		C2[i] = C1[i];
	BubbleSort(C1, n);
	SelectionSort(C2, n);
	print(C1, n);
	cout << "Stable" << endl;
	print(C2, n);
	if (isStable(C1, C2, n)){
		cout << "Stable" << endl;
	}
	else{
		cout << "Not stable" << endl;
	}
	return 0;
}

Compiler output:
a.cc: In function 'bool isStable(C1*, C2*, int)':
a.cc:42:23: error: expected unqualified-id before '[' token
   42 |                 if (C1[i].suit != C2[i].suit){
      |                       ^
a.cc: In function 'int main()':
a.cc:64:22: error: cannot convert 'Card*' to 'C1*'
   64 |         if (isStable(C1, C2, n)){
      |                      ^~
      |                      |
      |                      Card*
a.cc:40:15: note:   initializing argument 1 of 'bool isStable(C1*, C2*, int)'
   40 | bool isStable(struct C1[],struct C2[],int n){
      |               ^~~~~~~~~~~
Language: C++

#Include <stdio.h>
#include <stdbool.h>
#include <string.h>
typedef struct{
  char c;
  int num;
}pair;

void bubblesort(pair* , int );
void selectionsort(pair* , int);
//bool stable(pair*, pair* ,int );


int main(){

  int e,n,i,j,temp,flag = 0;
  pair box[64];
  pair in1[64];
  pair in2[64];
  char emp;

  scanf("%d\n",&n);
  printf("n = %d\n",n);

  for(i = 0;i < n;i++){
    printf("%d\n",i);
    scanf("%c",&box[i].c);
    scanf("%d",&box[i].num);
    if(i != 4) scanf("%c",&emp);
    // scanf("%c\n",&emp);

    printf("c = %c,num = %d\n",box[i].c,box[i].num);
    in1[i].c = box[i].c;
    in2[i].c = box[i].c;
    in1[i].num = box[i].num;
    in2[i].num = box[i].num;
  }

  bubblesort(in1,n);
  
  for(i = 0;i < n;i++){
    printf("%c",in1[i].c);
    printf("%d ",in1[i].num);
  }
  printf("\n");

  printf("stable\n");

  selectionsort(in2,n);


  for(i = 0;i < n;i++){
    printf("%c",in2[i].c);
    printf("%d ",in2[i].num);
  }
  printf("\n");

  for(i = 0;i < n;i++){
    if(in1[i].num != in2[i].num || in1[i].c != in2[i].c){
      flag = 1;
      break;
    }
  }
  if(flag == 0) printf("stable\n");
  else printf("not stable\n");


  return 0; 
}

void bubblesort(pair *c, int n){

  int temp,i,j;
  char tem;
  for(i = 0;i <= n - 1;i++){
    for(j = n - 1;j >= i + 1;j--){
      if(c[j].num < c[j - 1].num){
	temp = c[j].num;
	tem = c[j].c;
	c[j].num = c[j - 1].num;
	c[j].c = c[j - 1].c;
	c[j - 1].num = temp;
	c[j - 1].c = tem;
      }
    }
  }

}


void selectionsort(pair *c, int n){

  int i,j,temp,minj;
  char tem;
  for(i = 0;i <= n - 1;i++){
    minj = i;
    for(j = i;j <= n - 1 ;j++){
      if(c[j].num < c[minj].num){
	minj = j;
      }
    }
    temp = c[i].num;
    tem = c[i].c;
    c[i].num = c[minj].num;
    c[i].c = c[minj].c;
    c[minj].num = temp;
    c[minj].c = tem;
  }
}

Compiler output:
a.cc:1:2: error: invalid preprocessing directive #Include; did you mean #include?
    1 | #Include <stdio.h>
      |  ^~~~~~~
      |  include
a.cc: In function 'int main()':
a.cc:22:3: error: 'scanf' was not declared in this scope
   22 |   scanf("%d\n",&n);
      |   ^~~~~
a.cc:23:3: error: 'printf' was not declared in this scope
   23 |   printf("n = %d\n",n);
      |   ^~~~~~
a.cc:4:1: note: 'printf' is defined in header '<cstdio>'; this is probably fixable by adding '#include <cstdio>'
    3 | #include <string.h>
  +++ |+#include <cstdio>
    4 | typedef struct{
Language: C++

#Include <stdio.h>
#include <stdbool.h>
#include <string.h>
typedef struct{
  char c;
  int num;
}pair;

void bubblesort(pair* , int );
void selectionsort(pair* , int);



int main(){

  int e,n,i,j,temp,flag = 0;
  pair box[64];
  pair in1[64];
  pair in2[64];
  char emp;

  scanf("%d\n",&n);
  printf("n = %d\n",n);

  for(i = 0;i < n;i++){
    printf("%d\n",i);
    scanf("%c",&box[i].c);
    scanf("%d",&box[i].num);
    if(i != 4) scanf("%c",&emp);
    // scanf("%c\n",&emp);

    printf("c = %c,num = %d\n",box[i].c,box[i].num);
    in1[i].c = box[i].c;
    in2[i].c = box[i].c;
    in1[i].num = box[i].num;
    in2[i].num = box[i].num;
  }

  bubblesort(in1,n);
  
  for(i = 0;i < n;i++){
    printf("%c",in1[i].c);
    printf("%d ",in1[i].num);
  }
  printf("\n");

  printf("stable\n");

  selectionsort(in2,n);


  for(i = 0;i < n;i++){
    printf("%c",in2[i].c);
    printf("%d ",in2[i].num);
  }
  printf("\n");

  for(i = 0;i < n;i++){
    if(in1[i].num != in2[i].num || in1[i].c != in2[i].c){
      flag = 1;
      break;
    }
  }
  if(flag == 0) printf("stable\n");
  else printf("not stable\n");


  return 0; 
}

void bubblesort(pair *c, int n){

  int temp,i,j;
  char tem;
  for(i = 0;i <= n - 1;i++){
    for(j = n - 1;j >= i + 1;j--){
      if(c[j].num < c[j - 1].num){
	temp = c[j].num;
	tem = c[j].c;
	c[j].num = c[j - 1].num;
	c[j].c = c[j - 1].c;
	c[j - 1].num = temp;
	c[j - 1].c = tem;
      }
    }
  }

}


void selectionsort(pair *c, int n){

  int i,j,temp,minj;
  char tem;
  for(i = 0;i <= n - 1;i++){
    minj = i;
    for(j = i;j <= n - 1 ;j++){
      if(c[j].num < c[minj].num){
	minj = j;
      }
    }
    temp = c[i].num;
    tem = c[i].c;
    c[i].num = c[minj].num;
    c[i].c = c[minj].c;
    c[minj].num = temp;
    c[minj].c = tem;
  }
}

Compiler output:
a.cc:1:2: error: invalid preprocessing directive #Include; did you mean #include?
    1 | #Include <stdio.h>
      |  ^~~~~~~
      |  include
a.cc: In function 'int main()':
a.cc:22:3: error: 'scanf' was not declared in this scope
   22 |   scanf("%d\n",&n);
      |   ^~~~~
a.cc:23:3: error: 'printf' was not declared in this scope
   23 |   printf("n = %d\n",n);
      |   ^~~~~~
a.cc:4:1: note: 'printf' is defined in header '<cstdio>'; this is probably fixable by adding '#include <cstdio>'
    3 | #include <string.h>
  +++ |+#include <cstdio>
    4 | typedef struct{
Language: C++

#include <iostream>

using namespace std;

static const int MAX = 100;

struct Card { char suit, value; };

void bubbleSort(struct Card A[], int N){
    bool flag = true;
    for (int i = 0; flag; i++){
        flag = false;
        for (int j = N - 1; j > i + 1; j--){
            if (A[j].value < A[j - 1].value){
                Card tmp = A[j];
                A[j] = A[j - 1];
                A[j - 1] = tmp;
                flag = true;
            }
        }
    }
}

void selectionSort(struct Card A[], int N){
    for (int i = 0; i < N - 1; i++){
        int minj = i;
        for (int j = 1 + 1; j < N; j++){
            if (A[j].value < A[minj].value) minj = j;
        }
        if (minj != i){
            Card tmp = A[minj];
            A[minj] = A[i];
            A[i] = tmp;
        }
    }
}

void trace(struct Card A[], int N){
    for (int i = 0; i < N; i++){
        if (i) cout << ' ';
        cout << A[i].suit << A[i].value;
    }
    cout << endl;
}

bool isStable(struct Card C1[], struct Card C2[], int N){
    for (int i = 0; i < N; i++){
        if (C1[i].suit != C2[i].suit) return false;
    }
    return true;
}

int main(){
    int num;
    Card C1[MAX], C2[MAX];

    cin >> num;
    for (int i = 0; i < num; i++) cin >> C1[i].suit >> C1.value;
    for (int i = 0; i < num; i++) C2[i] = C1[i];

    bubbleSort(C1, num);
    selectionSort(C2, num);

    trace(C1, num);
    cout << "Stable" << endl;

    trace(C2, num);
    if (isStable(C1, C2, num){
        cout << "Stable" << endl;
    } else {
        cout << "Not stable" << endl;
    }

    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:58:59: error: request for member 'value' in 'C1', which is of non-class type 'Card [100]'
   58 |     for (int i = 0; i < num; i++) cin >> C1[i].suit >> C1.value;
      |                                                           ^~~~~
a.cc:68:30: error: expected ';' before '{' token
   68 |     if (isStable(C1, C2, num){
      |                              ^
      |                              ;
a.cc:70:7: error: expected primary-expression before 'else'
   70 |     } else {
      |       ^~~~
a.cc:70:6: error: expected ')' before 'else'
   70 |     } else {
      |      ^~~~~
      |      )
a.cc:68:8: note: to match this '('
   68 |     if (isStable(C1, C2, num){
      |        ^
Language: C++

#include<iostream>
using namespace std;
struct Card {char suit, value; };

void bubble{struct Card[A] , int N}{
  for (int i = 0; i<N ;i++){
    for (int j =N-1; j>= i +1; j--){
      if(A[j].value <A[j-1].value){
        Card t = A[j]; A[j] = A[j-1]; A[j-1] =t;
      }
    }
  }
}

void selection(struct Card  A[] , int N){
  for ( int i =0;i<N;i++){
    int minj =i;
    for(int j =i ; j<N ; j++){
      if (A[j].value <A[minj].value) minj =j;
    }
    Card t =A[i]; A[i] =A[minj]; A[minj] = t;
  }
}

void print(struct Card A[], int N){
  for ( int i=0; i<N ;i++){
    if(i >0) cout << " ";
    cout << A[i].suit <<A[i].value;
  }
  cout << endl;
}
bool isStable(struct Card C1[], struct Card C2[],int N){
  for(int i =0; i<N;i++){
    if (C1[i].suit != C2[i].suit) return false;
  }
  return true;
  }

int main (){
  Card C1[100], C2[100];
  int N;
  char ch;

  cin >>N;
  for ( int i =0; i<N; i++){
    cin >> C1[i].suit >> C1[i].value;
  }
  for (int i=0;i<N ; i++) C2[i] = C1[i];

  bubble(C1,N);
  selection(C2,N);

  print(C1,N);
  cout << "stable" << endl;
  print(C2,N);
  if ( isStable(C1,C2,N)){
    cout << "Not stable" <<endl;
  }
  return 0;
}

Compiler output:
a.cc:5:6: error: variable or field 'bubble' declared void
    5 | void bubble{struct Card[A] , int N}{
      |      ^~~~~~
a.cc:5:13: error: expected primary-expression before 'struct'
    5 | void bubble{struct Card[A] , int N}{
      |             ^~~~~~
a.cc:5:13: error: expected '}' before 'struct'
    5 | void bubble{struct Card[A] , int N}{
      |            ~^~~~~~
a.cc:5:35: error: expected declaration before '}' token
    5 | void bubble{struct Card[A] , int N}{
      |                                   ^
a.cc:5:36: error: expected unqualified-id before '{' token
    5 | void bubble{struct Card[A] , int N}{
      |                                    ^
a.cc: In function 'int main()':
a.cc:50:3: error: 'bubble' was not declared in this scope
   50 |   bubble(C1,N);
      |   ^~~~~~
Language: C++

#include<iostream>
using namespace std;
struct Card {char suit, value; };

void bubble (struct Card [A] , int N) {
  for (int i = 0; i<N ;i++){
    for (int j =N-1; j>= i +1; j--){
      if(A[j].value <A[j-1].value){
        Card t = A[j]; A[j] = A[j-1]; A[j-1] =t;
      }
    }
  }
}

void selection(struct Card  A[] , int N){
  for ( int i =0;i<N;i++){
    int minj =i;
    for(int j =i ; j<N ; j++){
      if (A[j].value <A[minj].value) minj =j;
    }
    Card t =A[i]; A[i] =A[minj]; A[minj] = t;
  }
}

void print(struct Card A[], int N){
  for ( int i=0; i<N ;i++){
    if(i >0) cout << " ";
    cout << A[i].suit <<A[i].value;
  }
  cout << endl;
}
bool isStable(struct Card C1[], struct Card C2[],int N){
  for(int i =0; i<N;i++){
    if (C1[i].suit != C2[i].suit) return false;
  }
  return true;
  }

int main (){
  Card C1[100], C2[100];
  int N;
  char ch;

  cin >>N;
  for ( int i =0; i<N; i++){
    cin >> C1[i].suit >> C1[i].value;
  }
  for (int i=0;i<N ; i++) C2[i] = C1[i];

  bubble(C1,N);
  selection(C2,N);

  print(C1,N);
  cout << "stable" << endl;
  print(C2,N);
  if ( isStable(C1,C2,N)){
    cout << "Not stable" <<endl;
  }
  return 0;
}

Compiler output:
a.cc:5:27: error: 'A' was not declared in this scope
    5 | void bubble (struct Card [A] , int N) {
      |                           ^
a.cc: In function 'void bubble(...)':
a.cc:8:10: error: 'A' was not declared in this scope
    8 |       if(A[j].value <A[j-1].value){
      |          ^
Language: C++

#include<iostream>
using namespace std;
struct Card {char suit, value; };

void bubble(struct Card [A] , int N) {
  for (int i = 0; i<N ;i++){
    for (int j =N-1; j>= i +1; j--){
      if(A[j].value <A[j-1].value){
        Card t = A[j]; A[j] = A[j-1]; A[j-1] =t;
      }
    }
  }
}

void selection(struct Card  A[] , int N){
  for ( int i =0;i<N;i++){
    int minj =i;
    for(int j =i ; j<N ; j++){
      if (A[j].value <A[minj].value) minj =j;
    }
    Card t =A[i]; A[i] =A[minj]; A[minj] = t;
  }
}

void print(struct Card A[], int N){
  for ( int i=0; i<N ;i++){
    if(i >0) cout << " ";
    cout << A[i].suit <<A[i].value;
  }
  cout << endl;
}
bool isStable(struct Card C1[], struct Card C2[],int N){
  for(int i =0; i<N;i++){
    if (C1[i].suit != C2[i].suit) return false;
  }
  return true;
  }

int main (){
  Card C1[100], C2[100];
  int N;
  char ch;

  cin >>N;
  for ( int i =0; i<N; i++){
    cin >> C1[i].suit >> C1[i].value;
  }
  for (int i=0;i<N ; i++) C2[i] = C1[i];

  bubble(C1, N);
  selection(C2,N);

  print(C1,N);
  cout << "stable" << endl;
  print(C2,N);
  if ( isStable(C1,C2,N)){
    cout << "Not stable" <<endl;
  }
  return 0;
}

Compiler output:
a.cc:5:26: error: 'A' was not declared in this scope
    5 | void bubble(struct Card [A] , int N) {
      |                          ^
a.cc: In function 'void bubble(...)':
a.cc:8:10: error: 'A' was not declared in this scope
    8 |       if(A[j].value <A[j-1].value){
      |          ^
Language: C++

#include<iostream>
using namespace std;

struct Card { char suit, value };

void bubble ( Card A[], int N ) {
	for ( int i = 0; i < N; i++) {
		for ( int j = N - 1; j >= i + 1 ; j--) {
			if ( A[j].value < A[j - 1].value ) {
				swap( A[j], A[j - 1] ) 
			}
		}
	}
}

void selection( Card A[], int N) {
	for ( int i = 0; i < N; i++) {
		int minj = i
		for ( int j = i; j < N; j++ ){
			if ( A[j].value < A[minj].value ) minj = j;
		}
		swap(A[i], A[minj]);
	}
}

void print( Card A[], int N ) {
	for ( int i = 0; i < N; i++) {
		if (i) cout << " ";
		cout << A[i].suit << A[i].value ;
	}
	cout << endl;
}

bool isStable( Card C1[], Card C2[], int N) {
	for ( int i = 0; i < N; i++ ) {
		if ( C1[i].suit != C2[i].suit ) return false;
	}
	return true;
}

int main() {
	Card C1[100], C2[100];
	int N;

	cin >> N;

	for ( int i = 0; i < N; i++ ) {
		cin >> C1[i].suit >> C1[i].value
		C2[i] = C1[i];
	}

	bubble(C1, N);
	selection(C2, N);

	print(C1, N);
	cout << "Stable" << enl;
	print(C2, N);
	if ( isStable(C1, C2, N) ) {
		cout << "Stable" << endl;
	} else {
	cout << "No stable" << endl;
	}
	return 0;

}

Compiler output:
a.cc:4:26: error: expected ';' at end of member declaration
    4 | struct Card { char suit, value };
      |                          ^~~~~
      |                               ;
a.cc: In function 'void bubble(Card*, int)':
a.cc:10:55: error: expected ';' before '}' token
   10 |                                 swap( A[j], A[j - 1] )
      |                                                       ^
      |                                                       ;
   11 |                         }
      |                         ~                              
a.cc: In function 'void selection(Card*, int)':
a.cc:19:17: error: expected ',' or ';' before 'for'
   19 |                 for ( int j = i; j < N; j++ ){
      |                 ^~~
a.cc:19:34: error: 'j' was not declared in this scope
   19 |                 for ( int j = i; j < N; j++ ){
      |                                  ^
a.cc: In function 'int main()':
a.cc:48:49: error: expected ';' before 'C2'
   48 |                 cin >> C1[i].suit >> C1[i].value
      |                                                 ^
      |                                                 ;
   49 |                 C2[i] = C1[i];
      |                 ~~                               
a.cc:56:29: error: 'enl' was not declared in this scope
   56 |         cout << "Stable" << enl;
      |                             ^~~
Language: C++

#include<iostream>
using namespace std;

struct Card { char suit, value; };

void bubble( struct Card A[], int N) {
	for ( int i = 0; i < N; i++ ) {
		for (int j = N - 1; j >= i + 1; j-- ) {
			if (A[j].value < A[j - 1].value ) {
				Card t = A[j]; A[j] = A[j - 1]; A[j - 1] = t;
			}
		}
	}
}

void selection( struct Card A[], int N) {
	for (int i = 0; i < N; i++ ) {
		int minj = i;
		for (int j = i; j < N; j++ ) {
			if ( A[j].value < A[minj].value ) minj = j;
		}
		Card t = A[i]; A[i] = A[minj]; A[minj] = t;
	}
}

void print( struct Card A[], int N) {
	for ( int i = 0; i < N; i++ ) {
		if (i > 0) cout << " ";
		cout << A[i].suit << A[i].value;
	}
	cout << endl;
}

bool isStable (struct Card C1[], struct Card C2[], int N) {
for ( int i = 0; i < N; i++ ) {
	if ( C1[i].suit != C2[i].suit ) return false;
}
	return true;
}

int main() {
	Card C1[100], Card C2[100];
	int N;
	char ch;

	cin >> N;
	for (int i = 0; i < N; i++ ) {
		cin >> C1[i].suit >> C1[i].value;
	}

	for ( int i = 0; i < N; i++ ) C2[i] = C1[i];

	bubble(C1, N);
	selection(C2, N);

	print(C1, N);
	cout << "Stable" << endl;
	print(C2, N);
	if ( isStable(C1, C2, N) ) {
		cout << "Stable" << endl;
	} else {
		cout << "Not stable" << endl;
	}

	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:42:28: error: expected initializer before 'C2'
   42 |         Card C1[100], Card C2[100];
      |                            ^~
a.cc:51:39: error: 'C2' was not declared in this scope; did you mean 'C1'?
   51 |         for ( int i = 0; i < N; i++ ) C2[i] = C1[i];
      |                                       ^~
      |                                       C1
a.cc:54:19: error: 'C2' was not declared in this scope; did you mean 'C1'?
   54 |         selection(C2, N);
      |                   ^~
      |                   C1
Language: C++


struct card{
  int num;
  char mark;
};

struct card card_i[40], card_j[40];

void BubbleSort(int n);
void SelectionSort(int n);
void write(int n);
void stable(int n);

int main(void){
  int n, i, j;

  scanf("%d", &n);
  for(i = 0; i < n; i++){
    scanf("%c", &card_i[i].mark);
    scanf("%d", &card_i[i].num);
    card_j[i] = card_i[i];
  }

  write(n);

  BubbleSort(n);
  stable(n);
  SelectionSort(n);
  stable(n);

  return 0;
}

void BubbleSort(int n){
  int i, j;
  struct card k;
  for(i = 0; i < n-1; i++){
    for(j = n-1; j > i; j--){
      if(card_j[j].num < card_j[j-1].num){
	k = card_j[j];
	card_j[j] = card_j[j-1];
	card_j[j-1] = k;
      }
    }
  }
  write(n);
  return;
}

void SelectionSort(int n){
  int i, j, minj;
  struct card k;

  for(i = 0; i < n-1; i++){
    minj = i;
    for(j = i; j < n-1; j++){
      if(card_j[j].num < card_j[minj].num) minj = j;
    }
    k = card_j[minj];
    card_j[minj] = card_j[i];
    card_j[i] = k;
  }
  write(n);
  return;
}

void write(int n){
  int i, j;
  for(i = 0; i < n; i++){
    printf("%c%d ", card_j[i].mark, card_j[i].num);
  }
  printf("\b\n");
  return;
}

void stable(int n){
  int i, j, k[4], kk[4], co1 = 0, co2 = 0, co = 0, z;
  for(i = 0; i < 9; i++){
      for(j = 0; j < n; j++){
	if(card_j[j].num == 49+i){
	  k[co1] = card_j[j].mark;
	  co1++;
	  co++;
	}
      }
      for(j = 0; j < n; j++){
	if(card_i[j].num == 49+i){
	  kk[co2] = card_i[j].mark;
	  co2++;
	}
      }
      for(j = 0; j < co; j++){
	if(co == 0) break;
	if(k[j] != kk[j]){
	  for(z = 0; z < n; z++){
	    card_j[z].mark = card_i[z].mark;
	  }
	  printf("Not stable\n");
	  return;
	}
      }
      co1 = 0;
      co2 = 0;
      co = 0;
  }
  for(z = 0; z < n; z++){
    card_j[z].mark = card_i[z].mark;
  }
  printf("Stable\n");
  return;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:17:3: error: 'scanf' was not declared in this scope
   17 |   scanf("%d", &n);
      |   ^~~~~
a.cc: In function 'void write(int)':
a.cc:70:5: error: 'printf' was not declared in this scope
   70 |     printf("%c%d ", card_j[i].mark, card_j[i].num);
      |     ^~~~~~
a.cc:1:1: note: 'printf' is defined in header '<cstdio>'; this is probably fixable by adding '#include <cstdio>'
  +++ |+#include <cstdio>
    1 | 
a.cc:72:3: error: 'printf' was not declared in this scope
   72 |   printf("\b\n");
      |   ^~~~~~
a.cc:72:3: note: 'printf' is defined in header '<cstdio>'; this is probably fixable by adding '#include <cstdio>'
a.cc: In function 'void stable(int)':
a.cc:98:11: error: 'printf' was not declared in this scope
   98 |           printf("Not stable\n");
      |           ^~~~~~
a.cc:98:11: note: 'printf' is defined in header '<cstdio>'; this is probably fixable by adding '#include <cstdio>'
a.cc:109:3: error: 'printf' was not declared in this scope
  109 |   printf("Stable\n");
      |   ^~~~~~
a.cc:109:3: note: 'printf' is defined in header '<cstdio>'; this is probably fixable by adding '#include <cstdio>'
Language: C++

#include<iostReam>
using namespace std;

struct Card {
	char suit;
	int value;
}; 

void bubble(struct Card A[],int N) {
	bool flag = 1;
	for ( int i = 0; flag; i++) {
		flag = 0;
		for (int j = N - 1; j > i; j--) {
			if (A[j].value < A[j-1].value) {
				swap(A[j],A[j-1]);
				flag = 1;
			}
		}
	} 
}

void selection(struct Card A[],int N) {
	for(int i=0; i<N-1; i++) {
		int minj = i;
		for(int j=i; j<N; j++) {
			if(A[j].value < A[minj].value) minj = j;
		}
		Card t = A[minj]; A[minj] = A[i]; A[i] = t;
	}
}

void print(struct Card A[], int N) {
    for (int i=0; i<N; i++) {
    	if(i>0) cout << " ";
    	cout << A[i].suit << A[i].value;
    }
    cout << endl;
} 

bool isStable(struct Card C1[], struct Card C2[], int N) {
	for (int i=0; i<N; i++) {
		if ( C1[i].suit != C2[i].suit ) return false; 
		}
	return true;
}

int main() {
	Card C1[100], C2[100];
	int N;
	char ch;
	
	cin >> N;
	for(int i=0; i<N; i++) {
		cin >> C1[i].suit >> C1[i].value; 
	}
	
	for(int i=0; i<N; i++) {
		C2[i] = C1[i]; 
	}
	
	bubble(C1, N);
	selection(C2, N);
	
    print(C2, N);
    cout << "Stable" << endl;
	print(C2, N);
	if (isStable(C1, C2, N)) {
		cout << "Stable" << endl;
	} else {
		cout << "Not stable" << endl;
	}
	 
	return 0;	
}

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

#include<iostream>
using namespace std;

struct card{char suit,value;};

void bubble(struct card a[],int n){
	for(int i=0;i<n;i++){
		for(int j=n-1;j>=i;i++){
			if(a[j].value<a[j-1].value){
				card t=a[j];a[j]=a[j-1];a[j-1]=t;
			}
		}
	}
}

void selection(struct card a[],int n){
	for(int i=0;i<n;i++){
		int minj = i;
		for(intj=i;j<n;j++){
			if(a[j].value<a[minj].value )minj=j;
		}
		card t=a[i];a[i]=a[minj];a[minj]=t;
	}
}

void print(struct card a[],int n){
	for(int i=0;i<n;i++){
		if(i>0)cout<<" ";
		cout<<a[i].suit<<a[i].value;
	}
	cout<<endl;
}

bool isstable(struct card c1[],struct card c2[],int n){
	for(int i=0;i<n;i++){
		if(c1[i].suit!=c2[i].suit)return false;
	}
	return true;
}

int main(){
	card c1[100],c2[200];
	int n;
	char ch;
	cin>>n;
	for(int i=0;i<n;i++){
		cin>>c1[i].suit>>c1[i].value;
	}
	for(int i=0;i<n;i++)c2[i]=c1[i];
	
	bubble(c1.n);
	selection(c2,n);
	
	print(c1,n);
	cout<<"stable"<<endl;
	print(c2,n);
	if(isstable(c1,c2,n)){
		cout<<" stable"<<endl;
	}else{
			cout<<"not stable"<<endl;
		}
	return 0;
}

Compiler output:
a.cc: In function 'void selection(card*, int)':
a.cc:19:21: error: 'intj' was not declared in this scope; did you mean 'int'?
   19 |                 for(intj=i;j<n;j++){
      |                     ^~~~
      |                     int
a.cc:19:28: error: 'j' was not declared in this scope
   19 |                 for(intj=i;j<n;j++){
      |                            ^
a.cc: In function 'int main()':
a.cc:51:19: error: request for member 'n' in 'c1', which is of non-class type 'card [100]'
   51 |         bubble(c1.n);
      |                   ^
Language: C++

#include <iostream>
using namespace std;

struct Card{char suit,value};

void bubble(struct Card A[],int N){

 for(int i=0;i<N;i++){
  for(int j=N-1;j>=i;j--){
 if(A[j].value<A[j-1].value){
   Card t=A[j];A[j]=A[j-1];A[j-1]=t;
}
}
}
}

void selection(struct Card A[],int N){
  for(int i=0;i<N;i++){
 int minj=i;
 for(int j=i;j<N;j++){
 if(A[j].value<A[minj].value)minj=j;
}
Card t =A[i];A[i]=A[minj];A[minj]=t;
}
}
 
void print(struct Card A[],int N){
 for(int i=0;i<N;i++){
 if(i>0) cout <<" ";
cout << A[i].suit <<A[i].value;
}
cout << endl;
}

bool isStable(struct Card C1[],struct Card C2[],int N){
 for(int i=0;i<N;i++){
 if(C1[i].suit !=C2[i].suit) return false;
}
return true;
}

int main(){
 Card C1[100],C2[100];
int N;
char ch;

cin >>N;
for(int i=0;i<N;i++){
 cin >> C1[i].suit >>C1[i].value;

for(int i=0;i<N;i++) C2[i]=C1[i];

bubble(C1,N);
selection(C2,N);

print(C1,N);
cout << "Stable" <<endl;
}
else{
cout << "Not stable" << endl;
}

return 0;
}

Compiler output:
a.cc:4:23: error: expected ';' at end of member declaration
    4 | struct Card{char suit,value};
      |                       ^~~~~
      |                            ;
a.cc: In function 'int main()':
a.cc:59:1: error: 'else' without a previous 'if'
   59 | else{
      | ^~~~
Language: C++

#include <iostream>
using namespace std;

struct Card{char suit,value};

void bubble(struct Card A[],int N){

 for(int i=0;i<N;i++){
  for(int j=N-1;j>=i;j--){
 if(A[j].value<A[j-1].value){
   Card t=A[j]; A[j]=A[j-1]; A[j-1]=t;
}  
}
}
}

void selection(struct Card A[],int N){
  for(int i=0;i<N;i++){
 int minj=i;
 for(int j=i;j<N;j++){
 if(A[j].value<A[minj].value)minj=j;
}
Card t =A[i];A[i]=A[minj];A[minj]=t;
}
}
 
void print(struct Card A[],int N){
 for(int i=0;i<N;i++){
 if(i>0) cout <<" ";
cout << A[i].suit <<A[i].value;
}
cout << endl;
}

bool isStable(struct Card C1[],struct Card C2[],int N){
 for(int i=0;i<N;i++){
 if(C1[i].suit !=C2[i].suit) return false;
}
return true;
}

int main(){
 Card C1[100],C2[100];
int N;
char ch;

cin >>N;
for(int i=0;i<N;i++){
 cin >> C1[i].suit >>C1[i].value;
}
for(int i=0;i<N;i++) C2[i]=C1[i];

bubble(C1,N);
selection(C2,N);

print(C1,N);
cout << "Stable" <<endl;
}
else{
cout << "Not stable" << endl;
}

return 0;
}

Compiler output:
a.cc:4:23: error: expected ';' at end of member declaration
    4 | struct Card{char suit,value};
      |                       ^~~~~
      |                            ;
a.cc:59:1: error: expected unqualified-id before 'else'
   59 | else{
      | ^~~~
a.cc:63:1: error: expected unqualified-id before 'return'
   63 | return 0;
      | ^~~~~~
a.cc:64:1: error: expected declaration before '}' token
   64 | }
      | ^
Language: C++

#include<iostream>
using namespace std;

struct Card{ char suit, value; };

void bubble(struct Card A[], int N){
	for(int i = 0; i < N; i++){
		for(int j = N - 1; j >= i; j--){
			if(A[j].value < A[j-i].value){
				Card t = A[j]; 
				A[j] = A[j - 1];
				A[j - 1] = t;
			}
		}
	}
}

void selection(struct Card A[], int N){
	for(int i = 0; i < N; i++){
		int minj = i;
		for(int j = i; j < N; j++){
			if(A[j].value < A[minj].value) minj = j;
		}
		Card t = A[i];
		A[i] = A[minj];
		A[minj] = t;
	}
}

void print(struct Card A[], int N){
	for(int i = 0; i < N; i++){
		if(i > 0) cout << " ";
		cout << A[i].suit << A[i].value;
	}
	cout << endl;
}

bool isStable(struct Card C1[], struct Card2[], int N){
	for(int i = 0; i < N; i++){
		if(C1[i].suit != C2[i].suit)return false;
	}
	return true;
}

int main(){
	Card C1[100], C2[100];
	int N;
	char ch;
	
	cin >> N;
	for(int i = 0; i < N; i++){
		cin >> C1[i].suit >> C1[i].value;
	}
	
	for(int i = 0; i < N; i++) C2[i] = C1[i];
	
	bubble(C1, N);
	selection(C2, N);
	
	print(C1, N);
	cout << "Stable" << endl;
	print(C2, N);
	if(isStable(C1, C2, N)){
		cout << "Stable" << endl;
	}else{
		cout << "Not Stable" << endl;
	}
	
	return 0;
}

Compiler output:
a.cc: In function 'bool isStable(Card*, Card2*, int)':
a.cc:40:34: error: 'C2' was not declared in this scope; did you mean 'C1'?
   40 |                 if(C1[i].suit != C2[i].suit)return false;
      |                                  ^~
      |                                  C1
a.cc: In function 'int main()':
a.cc:63:25: error: cannot convert 'Card*' to 'Card2*'
   63 |         if(isStable(C1, C2, N)){
      |                         ^~
      |                         |
      |                         Card*
a.cc:38:33: note:   initializing argument 2 of 'bool isStable(Card*, Card2*, int)'
   38 | bool isStable(struct Card C1[], struct Card2[], int N){
      |                                 ^~~~~~~~~~~~~~
Language: C++

#include<iostream>
using namespace std;

struct Card{char suit,value;}

void bubble(struct Card A[],int N){
	for(int i=0;i<N;i++){
		for(int j=N-1;j>=i;j--){
			if(A[j].value<A[j-1].value){
				Card t=A[j];A[j]=A[j-1];A[j-1]=t;
			}
		}
	}
}

void selection(struct Card A[],int N){
	for(int i=0;i<N;i++){
		int minj=i;
		for(int j=i;j<N;j++){
			if(A[j].value<A[minj].value)minj=j;
		}
		Card t=A[i];A[i]=A[minj];A[minj]=t;
	}
}

void print(struct Card A[],int N){
	for(int i=0;i<N;i++){
		if(i>0)cout<<" ";
		cout<<A[i].suit<<A[i].value;
	}
	cout<<endl;
}

bool isStable(struct Card C1[],struct Card C2[],int N){
	for(int i=0;i<N;i++){
		if(C1[i].suit!=C2[i].suit)return false;
	}
	return true;
}

int main(){
	Card C1[100],C2[100];
	int N;
	char ch;
	
	cin>>N;
	for(int i=0;i<N;i++){
		cin>>C1[i].suit>>C1[i].value;
	}
	
	for(int i=0;i<N;i++)C2[i]=C1[i];
	
	bubble(C1,N);
	selection(C2,N);
	
	print(C1,N);
	cout<<"Stable"<<endl;
	print(C2,N);
	if(isStable(C1,C2,N)){
		cout<<"Stable"<<endl;
	}else{
		cout<<"No stable"<<endl;
	}
	return 0;
}

Compiler output:
a.cc:4:30: error: expected ';' after struct definition
    4 | struct Card{char suit,value;}
      |                              ^
      |                              ;
Language: C++

def ri(): return int(input())
def rli(): return list(map(int, input().split()))
def rls(): return list(map(str, input().split()))
def pl(a): print(" ".join(list(map(str, a))))


N = ri()
a = rls()
bubble = a[:]

flag = True
while(flag):
    flag = False
    for i in range(1, N):
        if(bubble[-i][1] < bubble[-i-1][1]):
            hold = bubble[-i]
            bubble[-i] = bubble[-i-1]
            bubble[-i-1] = hold
            flag = True
pl(bubble)
print("Stable")  # ?????????Stable

selection = a[:]
for i in range(N):
    minj = i
    for j in range(i, N):
        if(selection[j][1] < selection[minj][1]):
            minj = j
    hold = selection[i]
    selection[i] = selection[minj]
    selection[minj] = hold

pl(selection)
print("Stable" if bubble == selection else "Not stable")

Compiler output:
a.cc:21:18: error: stray '#' in program
   21 | print("Stable")  # ?????????Stable
      |                  ^
a.cc:1:1: error: 'def' does not name a type
    1 | def ri(): return int(input())
      | ^~~
Language: C++

#include<iostream>
using namespace std;

struct Card{
	char suit, value;
}

void bubble(struct Card A[], int N){
	for( int i = 0; i < N; i++ ){
		for( int j = N - 1; j >= i; j-- ){
			if( A[j].value < A[j - 1].value ){
				Card t = A[j];
				A[j] = A[j - 1];
				A[j - 1] = t;
			}
		}
	}
}

void selection(struct Card A[], int N){
	for( int i = 0; i < N; i++ ){
		int minj = i;
		for( int j = i; j < N; j++ ){
			if( A[j].value < A[minj].value ) minj = j;
		}
		Card t = A[i];
		A[i] = A[minj];
		A[minj] = t;
	}
}

void print(struct Card A[], int N){
	for( int i = 0; i < N; i++ ){
		if( I > 0 ) cout << " ";
		cout << A[i].suti << A[i].value;
	}
	cout << endl;
}

bool isStable(struct Card C1[], struct Card C2[], int N){
	for( int i = 0; i < N; i++ ){
		if( C1[i].suti != C2[i].suti ) return false;
	}
	return true;
}

int main(){
	Card C1[100], C2[100];
	int N;
	char ch;
	
	cin >> N;
	for( int i = 0; i < N; i++ ){
		cin >> C1[i].suti >> C1[i].value;
	}
	
	for( int i = 0; i < N; i++ ) C2[i] = C1[i];
	
	bubble(C1, N);
	selection(C2, N);
	
	print(C1, N);
	cout << "Stable" << endl;
	print(C2, N);
	if( isStable(C1, C2, N) ){
		cout << "Stable" << endl;
	} else {
		cout << " Not stable" << endl;
	}
	
	return 0;
}

Compiler output:
a.cc:6:2: error: expected ';' after struct definition
    6 | }
      |  ^
      |  ;
a.cc: In function 'void print(Card*, int)':
a.cc:34:21: error: 'I' was not declared in this scope
   34 |                 if( I > 0 ) cout << " ";
      |                     ^
a.cc:35:30: error: 'struct Card' has no member named 'suti'; did you mean 'suit'?
   35 |                 cout << A[i].suti << A[i].value;
      |                              ^~~~
      |                              suit
a.cc: In function 'bool isStable(Card*, Card*, int)':
a.cc:42:27: error: 'struct Card' has no member named 'suti'; did you mean 'suit'?
   42 |                 if( C1[i].suti != C2[i].suti ) return false;
      |                           ^~~~
      |                           suit
a.cc:42:41: error: 'struct Card' has no member named 'suti'; did you mean 'suit'?
   42 |                 if( C1[i].suti != C2[i].suti ) return false;
      |                                         ^~~~
      |                                         suit
a.cc: In function 'int main()':
a.cc:54:30: error: 'struct Card' has no member named 'suti'; did you mean 'suit'?
   54 |                 cin >> C1[i].suti >> C1[i].value;
      |                              ^~~~
      |                              suit