Click to See Complete Forum and Search --> : Help with error
sparkyg5
03-07-2007, 03:22 AM
Im having trouble with solving an error in a for loop. I wrote:
for (long number = first, number <= last, number++) {
....
}
The error states:
Error: Invalid for statement
How would I solve this???
mattv10
03-07-2007, 06:53 PM
Im having trouble with solving an error in a for loop. I wrote:
for (long number = first, number <= last, number++) {
....
}
The error states:
Error: Invalid for statement
How would I solve this???
use a semi colon between each..
for(long number = first; number <= last; number++)
Hope this helps
agent_x91
03-10-2007, 11:41 AM
Yeah, it's important to remember that for statement parameters are separated by semi-colons not commas. Mattv10's suggestion should work.