Please suggest what's wrong in code (Form Biggest Number)

#include
#include
#include
using namespace std;
int main() {
int t;
cin>>t;
while(t–){
int n;
cin>>n;
string a[n];
for(int i=0;i<n;i++)cin>>a[i];
sort(a,a+n);
for(int i=n-1;i>=0;i–)cout<<a[i];
cout<<endl;
}
return 0;
}

@Equinoxx9 hey harsh let’s consider this case
8
1 34 3 98 9 76 45 4
if you sort these numbers then
sorted number is
1 3 4 9 34 45 76 98
now reverse
987645349431
but actually the output should be
998764543431
now design a compare function which will passed with sort function