In this program that i wrote that is part of a bigger program.. i got these errors on line 20 - Syntax error on token "void", @ expected - Syntax error on token(s), misplaced construct(s). tried searching the web but couldnt find anything.
Probably you didn't think you were trying to do that, but the inconsistent nesting of the braces in that code makes it hard to tell. If you're using an IDE, then ask it to reformat your code so the nesting makes sense.
Check your indentation, which is incorrect. You may have {} out of balance. Following an indentation convention can prevent all sorts of errors. Also you shouldwrite backwards, which can improve your indentation.