Quote:
Originally posted by jaeusm You have a subtle syntax error -- a semicolon after your 'for' loops. Your 'i' variable is out of scope. You defined 'i' within the scope of the 'for' loop, meaning that it only exists for the duration of the 'for' loop. The semicolon immediately following the 'for' declaration essentially means that you're looping around an empty statement. So, for each iteration, you will execute the following statement: After the for loop has exited, the variables defined in the 'for' declaration -- your 'i' variable, in this case -- are now out of scope.
Thus, when the compiler sees 'i' being used to index an array, it no longer exists.
The moral: remove the semicolons after your 'for' loop declarations. |
OH MY FVCK........... I FEEL LIKE AN IDIOT!........... BAH
Thanks jaeusm ........... Such a stupid error........ I even remember when it happened... Put ";" instead of "{" and must have missed the delete........
Fjf314........ the book did it for space, and I remember doing it in C and Fortran so it didn't phase me as one long code.
Ayoe fix my other GUI issue