Why do you declare a Gui variable in Initialize::event()?
I declared it because I thought it would be easier to write "gui.keyPressSurfaces[]" rather than "Gui::keyPressSurfaces" as I have at least 5 points in my code where I have to write that. And same goes for Input too in the Event class ( if that makes sense ).
But changing the event calls to "Gui::" instead just makes the compiler vomit the following error:
error: invalid use of non-static data member 'Gui::keyPressSurfaces'
changing the "Gui::" back to "gui." and then changing "input." to "Input::" causes no errors.
Edit:
I changed everything to read:
Event.cpp ( with changes to KEY_PRESS_SURFACE_... to match what I wanted it to look like ):
Gui::currentSurface = Gui::keyPressSurfaces[Input::KEY_PRESS_SURFACE_DEFAULT];
Gui.h:
SDL_Surface* keyPressSurfaces[];
SDL_Surface* currentScreen;
// To:
static SDL_Surface* keyPressSurfaces[];
static SDL_Surface* currentScreen;
the compiler then gives:
undefined reference to 'Gui::currentSurface'