A classmate said, "Teacher, I run the following code, the results of an error"
#include <iostream.h> int main () {char c, int b;return 0;} The result of the error is:
--------------------configuration:test-win32 Debug--------------------compiling...demo.cd:\ccode\test\demo.c (4) : Error C2059:syntax error: ' type ' Error executing cl.exe. Demo.obj-1 error (s), 0 warning (s)
The classmate didn't know where the mistake was.
is actually wrong in char c, int b; After declaring the variable C, immediately declare the variable B, at which time the variable C is not to write a comma, to write a semicolon line.
Maybe this classmate's composition level is better, comma, full period with the comparison slip. But the computer code is not like writing composition Ah, after declaring a type of variable, be sure to end with a semicolon oh.
C language Essay _ type declaration