I cant use classes

If you are a new Irrlicht Engine user, and have a newbie-question, this is the forum for you. You may also post general programming questions here.
Post Reply
Guest

I cant use classes

Post by Guest »

I have made a couple of apps with the irrlicht engine, but I cant get it to work with classes I always get SEvent identifier syntax error or some thing... I have wasted countless hours trying to figure it out and I have gotten no where.

so I am looking for a console app that supports classes for the irrlicht that I can build since it wont work for me, thanks.
Guest

Post by Guest »

this is the error:
Guest

Post by Guest »

error C2061: syntax error : identifier 'SEvent'

and the code is

...
#endif // _MSC_VER > 1000
#include <irrlicht.h>

class CGame : public IEventReceiver
{
public:
virtual bool OnEvent(SEvent event);
run();
};
...
keless
Posts: 805
Joined: Mon Dec 15, 2003 10:37 pm
Location: Los Angeles, California, USA

Post by keless »

SEvent is inside of a 'namespace'

you either need to say 'using namespace irr;' at the top of your file, or say irr::SEvent

this is explained in the examples that come with 0.4.0/1
a screen cap is worth 0x100000 DWORDS
Guest

Post by Guest »

thank you it worked... sorry i didnt follow the tutorials very well
Post Reply