bool keys[256] = { false };
and I get the following errors
error C2059: syntax error : '{' \application.h 22
error C2334: unexpected token(s) preceding '{'; skipping apparent function body \application.h 22
I've also tried
bool keys[256] = { };
bool keys[256] = { 0 };
whole source
#ifndef _APPLICATION_
#define _APPLICATION_
#include "GLwindow.h"
class Application
{
public:
Application();
~Application();
void Init();
void Update(float deltaTime);
void Render();
void mouseDown();
void mouseUp();
void keyDown(int index);
void keyUp(int index);
private:
GLWindow window;
bool keys[256] = { 0 }; // an array of whether or not keys are pressed
float angle;
};
#endif

New Topic/Question
Reply




MultiQuote











|