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 cardA[],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;
}
}

voir 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 stable(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 ca[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);
select(c2,N);

printf(c1,N);
cout<<"Stable"<<endl;
print(c2,N);
if(Stable(c1,c2,N)){
cout<<"Stable"<<endl;
}else{cout<<"Not stable"<<endl;
}

return 0;
}

Compiler output:
a.cc: In function 'void selection(cardA*, int)':
a.cc:21:4: error: 'A' was not declared in this scope
   21 | if(A[j].value<A[minj].value)minj=j;
      |    ^
a.cc:23:8: error: 'A' was not declared in this scope
   23 | card t=A[i];
      |        ^
a.cc: At global scope:
a.cc:29:1: error: 'voir' does not name a type; did you mean 'void'?
   29 | voir print(struct card A[],int N){
      | ^~~~
      | void
a.cc: In function 'int main()':
a.cc:51:6: error: 'c1' was not declared in this scope; did you mean 'ch'?
   51 | cin>>c1[i].suit>>c1[i].value;
      |      ^~
      |      ch
a.cc:54:27: error: 'c1' was not declared in this scope; did you mean 'ch'?
   54 | for(int i=0;i<N;i++)c2[i]=c1[i];
      |                           ^~
      |                           ch
a.cc:56:8: error: 'c1' was not declared in this scope; did you mean 'ch'?
   56 | bubble(c1,N);
      |        ^~
      |        ch
a.cc:57:8: error: invalid conversion from 'card*' to 'int' [-fpermissive]
   57 | select(c2,N);
      |        ^~
      |        |
      |        card*
a.cc:57:11: error: invalid conversion from 'int' to 'fd_set*' [-fpermissive]
   57 | select(c2,N);
      |           ^
      |           |
      |           int
a.cc:57:7: error: too few arguments to function 'int select(int, fd_set*, fd_set*, fd_set*, timeval*)'
   57 | select(c2,N);
      | ~~~~~~^~~~~~
In file included from /usr/include/x86_64-linux-gnu/sys/types.h:179,
                 from /usr/include/stdlib.h:514,
                 from /usr/include/c++/14/cstdlib:79,
                 from /usr/include/c++/14/ext/string_conversions.h:43,
                 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/x86_64-linux-gnu/sys/select.h:102:12: note: declared here
  102 | extern int select (int __nfds, fd_set *__restrict __readfds,
      |            ^~~~~~
a.cc:61:1: error: 'print' was not declared in this scope; did you mean 'printf'?
   61 | print(c2,N);
      | ^~~~~
      | printf
a.cc:62:4: error: 'Stable' was not declared in this scope; did you mean 'stable'?
   62 | if(Stable(c1,c2,N)){
      |    ^~~~~~
      |    stable