error C2143: syntax error : missing ‘;’ before ‘type’ This problem occurs when compiling C files The solution is: put all variable declarations before the executed code