Code::Blocks Forums
User forums => Using Code::Blocks => Topic started by: dolth on February 10, 2010, 01:49:56 pm
-
int main()
{
return 0;
}
class test //line 6
{ //line 7
int i;
};
'runs' fine in visual
in code::blocks i get:
G:\mijnspel\final\game\main.c|6|error: syntax error before "test"|
G:\mijnspel\final\game\main.c|7|error: syntax error before '{' token|
||=== Build finished: 2 errors, 0 warnings ===|
What am I missing?
-
C++ comments in C code :lol: :P
btw, not a C::B question
-
What am I missing?
Don't compile C++ code with a C compiler. If you develop in C++, choose the right file extension like *.cpp, not *.c this is C.
Topic clocked anyways as it violates our forum rules (not related to Code::Blocks itself, but general programming).