I have data struct of Citizens I need to transfer them to array of string, then sort that array.
This is what I wrote:
In debbuger I get :Code:ConSort(PERSON arr[TOT]) { int i=0, j; char *temp=NULL, **Lname[TOT]; while (arr[i].Lname) strcpy (*Lname[i],arr[i].Lname); for (i=0;i<TOT;i++) for (j=0;j<TOT;j++) if (strcmp(*Lname[j], *Lname[i])>0); { temp=*Lname[j]; *Lname[j]=*Lname[j+1]; *Lname[j+1]=temp; }; }
Unhandled exception in "filename" access violation
right in the begining of the function
TIA,
Ronen