please help :( simple sort problem

This is my code for sort char array...how to sort Z-A

for (int i=0;i<br_unesenih_el;i++)
for(int j=i;j<=br_unesenih_el;j++)
if((strcmp(nazivi[j],nazivi[i]))>0)
{
strcpy(temp,nazivi[i]);
strcpy(nazivi[i],nazivi[j]);
strcpy(nazivi[j],temp);

/*pomocna = polje_cijena[i];
polje_cijena[i]=polje_cijena[j];
polje_cijena[j]=pomocna;

pomocna2 = polje_sifra[i];
polje_sifra[i]=polje_sifra[j];
polje_sifra[j]=pomocna2;*/
}
if (strcmp(nazivi[j], nazivi[i]) < 0)
This not work. I try this. But thanks...
Topic archived. No new replies allowed.