hi ,
i am trying to alphabetize a list of names...
the thing is that i am passing these students from an array inside a struct,
am i even close?
here's is where i am-
Code://my struct: struct Student{ char lastname[20]; char firstname[20]; double exams[4]; double average; char letgrade; bool passed;}; //prototype: void Alph(Student[], int ns) //call: Alph(ClassList, ns); //Function C Alph============================================ void Alph(Student CL[], int ns){ int tempstu = 0; for (int x = 0; x < ns; x++){ if( CL[x].lastname, CL[x+1].lastname >0); //do swap tempstu = CL[x].lastname; CL[x].lastname = CL[x+1].lastname; CL[x+1].lastname = tempstu; } } }