In C (C89 and older I believe) variables must be declared at the beginning of a scope before any other statements are made in the code. So having that function call before declaring variables makes the compiler unhappy.
You could rename the file to .cpp and that should pacify it or just leave the declarations first.
Best Answer