codeblocks compilation error, C Tutorial
In Windows I'm getting a compilation error in code blocks when doing the c tutorial. Wondering if someone may know why? I've even copy and pasted the code from the tutorial with the same return. However the program runs fine when compiled and run in the terminal in Linux.
Code:
#include <stdio.h>
int main()
{
int this_is_a_number
printf( "Please enter a number: ");
scanf( "%d", &this_is_a_number );
printf( "You entered %d", this_is_a_number );
getchar ();
return 0;
}
Compile errors:
||=== Variable1, Debug ===|
C:\Users\Corey\Documents\CProjects\Variable1\Varia ble1\main.c|7|error: expected '=', ',', ';', 'asm' or '__attribute__' before 'printf'|
C:\Users\Corey\Documents\CProjects\Variable1\Varia ble1\main.c|8|error: 'this_is_a_number' undeclared (first use in this function)|
C:\Users\Corey\Documents\CProjects\Variable1\Varia ble1\main.c|8|error: (Each undeclared identifier is reported only once|
C:\Users\Corey\Documents\CProjects\Variable1\Varia ble1\main.c|8|error: for each function it appears in.)|
||=== Build finished: 4 errors, 0 warnings ===|