Given the searches, I feel as though this sort of thing has been asked many times. Nevertheless, I couldn't find an answer so here goes:
My setup:
CodeBlocks, GCC C++ and SDL
I'm currently going through LazyFoo's SDL tutorials, and am getting this error:
error: expected ')' before ':' token
from this code:
SDL_Surface* load_image(std::string myfile)
in this context
#include "SDL/SDL.h"
#include < string.h >
const int SCREEN_WIDTH = 425;
const int SCREEN_HEIGHT = 550;
const int SCREEN_BPP = 32;SDL_Surface* message = NULL;
SDL_Surface* background = NULL;
SDL_Surface* screen = NULL;SDL_Surface* load_image(std::string myfile)
{
more stuff and the rest of the program etc
}
I feel that this may have something to do with the way my string or SDL libraries are set up in CodeBlocks. Any suggestions or obvious links to solutions that I missed?