Right, so I'm writing a Crystal Caves level editor, and it's written in C++ using SDL (Win32 with MinGW, in case it helps). And for some reason it won't compile this perfectly reasonable line of code:
Code: Select all
screen = SDL_SetVideoMode(SCREEN_WIDTH, SCREEN_HEIGHT, SCREEN_BPP, SDL_SWSURFACE)
I'm using the latest version of SDL. It comes out with
Code: Select all
D:\Stuff\ccleved\main.cpp:17: error: expected primary-expression before '=' token
D:\Stuff\ccleved\main.cpp:17: error: expected primary-expression before ',' token
about 3 times, finishing with
Code: Select all
D:\Stuff\ccleved\main.cpp:17: error: expected `;' before ')' token
That's the offending line of code above. I haven't missed any closing brackets or semicolons on previous lines, and screen is a pointer to an SDL_Surface. What the heck is wrong?