Code::Blocks Forums

User forums => Using Code::Blocks => Topic started by: dolth on February 10, 2010, 01:49:56 pm

Title: transfer from visual to code::blocks
Post 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?
Title: Re: transfer from visual to code::blocks
Post by: oBFusCATed on February 10, 2010, 02:21:42 pm
C++ comments in C code  :lol:  :P

btw, not a  C::B question
Title: Re: transfer from visual to code::blocks
Post by: MortenMacFly on February 10, 2010, 02:47:03 pm
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).