Initializing in the header file i get the following error:
invalid in-class initialization of static data member of non-integral type 'bool [8]'
if i try to initialize in the .cpp, i get:
'bool Ion::KeyboardInput::key [8]' is a static data member; it can only be initialized at its definition
Heres the header:
enum MYKEYS {
KEY_UP, KEY_DOWN, KEY_LEFT, KEY_RIGHT, KEY_W, KEY_S, KEY_A, KEY_D
};
class KeyboardInput
{
public:
KeyboardInput();
~KeyboardInput();
static void getKeysDown(ALLEGRO_EVENT ev);
static void getKeysUp(ALLEGRO_EVENT ev);
static bool getKey(int keyChoice);
private:
static bool key[8] = {false, false, false, false, false, false, false, false};
};