I've serched a bit in the forum for this, and i've not found anything. I'll post in the bug section if this happens to be one, but.. it kinda too stupid to be true.
class Window {
private:
bool windowed;
bool windowOK;
public:
Window();
void handle_events();
void toggle_fullscreen();
bool error();
};
int main ( int argc, char * args [] ) {
return 0;
}
with this code, i get 5 errors and 4 warnings.. wtf?
C:\Programmi\Tetris\Test.c|1|error: syntax error before "Window"|
C:\Programmi\Tetris\Test.c|1|error: syntax error before '{' token|
C:\Programmi\Tetris\Test.c|4|warning: type defaults to `int' in declaration of `windowOK'|
C:\Programmi\Tetris\Test.c|4|warning: data definition has no type or storage class|
C:\Programmi\Tetris\Test.c|5|error: syntax error before ':' token|
C:\Programmi\Tetris\Test.c|9|error: syntax error before "error"|
C:\Programmi\Tetris\Test.c|9|warning: type defaults to `int' in declaration of `error'|
C:\Programmi\Tetris\Test.c|9|warning: data definition has no type or storage class|
C:\Programmi\Tetris\Test.c|10|error: syntax error before '}' token|
||=== Build finished: 5 errors, 4 warnings ===|
even the declaration of the class ( class Window { ) has 2 errors. Also, sometimes i get errors with booleans variables, and i have to restart the compiler to be able to compile. Is this a known bug or have i to submit it?
Thanks for help ^_^
PS: this code is copied from a part of a SDL tutorial. If i compile the whole thing, it compiles. AND! If i cut all the other pieces in the tutorial and i leave it EXACTLY as the code above, it compiles. So, actually, i'm having 2 versions of the same code, one compiling, the other one not.