Now I must have some logic error in my program. I am trying to output all students grades to the screen. I get the first one out OK, but then it doesn't want to output anything after their names for students 1-x. Here is a snip of my code, if anyone can see where I went wrong logically, please tell me.
Code:
counter=0;
if (input =="*")
{//do all students
ID=students[counter].ID;
first=students[counter].firstname;
count=0;
while(first!="")
{
cout << setw(12) << left << students[counter].firstname;
cout << setw(12) << left << students[counter].lastname;
cout << setw(6) << left << students[counter].ID;
num=grades[count].classnum;
while(num!="")
{
if(ID==grades[count].ID)
{
grade=grades[count].lettergrade;
classnum=grades[count].classnum;
counting=0;
while(courses[counting].name!="")
{
if(courses[counting].num==classnum)
{
cout << setw(31) << left <<courses[counting].name;
cout << setw(7) << left << courses[counting].num;
cout << setw(1) << grade << endl;
}//end if
counting++;
}//end while
}//end if
count++;
num=grades[count].classnum;
}//end while
counter++;
first=students[counter].firstname;
}//end while