Look up the definition of a for loop. What do each of the parts of the loop do? Do your parts comply?
WaltP
Posting Sage w/ dash of thyme
10,506 posts since May 2006
Reputation Points: 3,348
Solved Threads: 944
WaltP
Posting Sage w/ dash of thyme
10,506 posts since May 2006
Reputation Points: 3,348
Solved Threads: 944
for(int i=0; i<noofstudents; i++)
i think this will help you out assuming noofstudents contains the value for the no of times you want to run the loop...or i.e no of students of type studentdata...
tracethepath
Junior Poster in Training
54 posts since Jul 2007
Reputation Points: 8
Solved Threads: 4
I have, i done this before i posted this question! it says that the boolean expression is used to test condition to determine when the loop should terminate. The test condition must always involve comparing the value of the counter variable with some numerical limit. Which in this case was [i]
but im unsure still.
should i use a true false statement ??
In the for statement you posted for(int i = 0; students[i]; i++) , what is your comparison statement? What is it comparing?
WaltP
Posting Sage w/ dash of thyme
10,506 posts since May 2006
Reputation Points: 3,348
Solved Threads: 944