Language: C++

#include <stdio.h>

#define N 100

struct pair{
	int n;
	char m;
};

struct pair bubble[N],sel[N];
int n;

void Bubble(){
	int i,j,tmp;
	for(i=0;i<n-1;i++){
		for(j=n-1;j>i;j--){
			if(bubble[j] < bubble[j-1]){
				tmp=bubble[j];
				bubble[j] = bubble[j-1];
				bubble[j-1] = tmp;
				count++;
			}
		}
	}
}

void Select(){
	int i,minj,j,tmp;
	for(i = 0;i < n -1; i++){
		minj = i;
		for(j = i+1; j< n;j ++){
			if(sel[j] < sel[minj]){
				minj = j;
			}
		}
		if(minj != i){
			tmp = sel[minj];
			sel[minj] = sel[i];
			sel[i] = tmp;
			count++;
		}
	}

}

void print(){
	int i;
	for(i=0;i<n-1;i++){
		printf("%c%d ",bubble[i].m,bubble[i].n);
	}
	printf("%c%d\nStable\n",bubble[i].m,bubble[i].n);
	int flag=0;
	for(i=0;i<n-1;i++){
		if(sel[i].m != bubble[i].m) flag = 1;
		printf("%c%d ",sel[i].m,sel[i].n);
	}
	if(flag)printf("%c%d\nNot stable\n",sel[i].m,sel[i].n);
	else printf("%c%d\nStable\n",sel[i].m,sel[i].n);
}

int main(){
	int i;
	struct pair card[N];
	char space;
	scanf("%d\n",&n);
	for(i=0;i<n;i++){
		scanf("%c%d%c",&card[i].m,&card[i].n,&space);
	}
	bubble();
	Select();
	print();
	return 0;
}

Compiler output:
a.cc: In function 'void Bubble()':
a.cc:17:38: error: no match for 'operator<' (operand types are 'pair' and 'pair')
   17 |                         if(bubble[j] < bubble[j-1]){
      |                            ~~~~~~~~~ ^ ~~~~~~~~~~~
      |                                    |             |
      |                                    pair          pair
a.cc:18:45: error: cannot convert 'pair' to 'int' in assignment
   18 |                                 tmp=bubble[j];
      |                                     ~~~~~~~~^
      |                                             |
      |                                             pair
a.cc:20:47: error: no match for 'operator=' (operand types are 'pair' and 'int')
   20 |                                 bubble[j-1] = tmp;
      |                                               ^~~
a.cc:5:8: note: candidate: 'constexpr pair& pair::operator=(const pair&)'
    5 | struct pair{
      |        ^~~~
a.cc:5:8: note:   no known conversion for argument 1 from 'int' to 'const pair&'
a.cc:5:8: note: candidate: 'constexpr pair& pair::operator=(pair&&)'
a.cc:5:8: note:   no known conversion for argument 1 from 'int' to 'pair&&'
a.cc:21:33: error: 'count' was not declared in this scope
   21 |                                 count++;
      |                                 ^~~~~
a.cc: In function 'void Select()':
a.cc:32:35: error: no match for 'operator<' (operand types are 'pair' and 'pair')
   32 |                         if(sel[j] < sel[minj]){
      |                            ~~~~~~ ^ ~~~~~~~~~
      |                                 |           |
      |                                 pair        pair
a.cc:37:39: error: cannot convert 'pair' to 'int' in assignment
   37 |                         tmp = sel[minj];
      |                               ~~~~~~~~^
      |                                       |
      |                                       pair
a.cc:39:34: error: no match for 'operator=' (operand types are 'pair' and 'int')
   39 |                         sel[i] = tmp;
      |                                  ^~~
a.cc:5:8: note: candidate: 'constexpr pair& pair::operator=(const pair&)'
    5 | struct pair{
      |        ^~~~
a.cc:5:8: note:   no known conversion for argument 1 from 'int' to 'const pair&'
a.cc:5:8: note: candidate: 'constexpr pair& pair::operator=(pair&&)'
a.cc:5:8: note:   no known conversion for argument 1 from 'int' to 'pair&&'
a.cc:40:25: error: 'count' was not declared in this scope
   40 |                         count++;
      |                         ^~~~~
a.cc: In function 'int main()':
a.cc:69:15: error: 'bubble' cannot be used as a function
   69 |         bubble();
      |         ~~~~~~^~