i'm compiling this on putty (unix) and it's giving me some errors such as "warning: no new line at end of file IN function 'int main () ': error: expected '}' at end of input... Have you used or know about putty/unix ?
Some compilers are picky about having a NL character at the end of the source.
Open the source file and make sure the is a empty blank line after line 46.