hello, i wish to sort a string array alphabetically and im not sure if i am doing it right. for example:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
string a[5]; //initial array
string b[5]; //sorted array
int index = 0; //index of b array
for (int i = 0; i < 5; i++){
for (int j = 0; j < 5; j++){
int c = 0;
c = a[i].compare(a[i]);
if (c > 0){
b[index] = a[j];
index++;
}
}