cannot instantiate abstract class error
Posted: Fri Dec 28, 2007 10:18 pm
Got a 'MyEventReceiver' : cannot instantiate abstract class error when paste following code:
Before main:
Into main:
Tenks for answer.
Before main:
Code: Select all
class MyEventReceiver : public IEventReceiver
{
public:
virtual bool OnEvent(SEvent event)
{
if (event.KeyInput.Key == KEY_KEY_S && event.KeyInput.PressedDown)
{
cout << "PRESED S\n";
return true;
}
return false;
}
};
Code: Select all
MyEventReceiver receiver;
IrrlichtDevice *device = createDevice(video::EDT_DIRECT3D9, core::dimension2d<s32>(800, 600),32, false, false, false,&receiver);