error code:
Code: Select all
Unhandled exception at 0x010051b8 in CEGUI_SDL.exe: 0xC0000005: Access violation reading location 0x00000039.
handling event code:
class Event
{
public:
Code: Select all
Event()
{
CEGUI::WindowManager& wmgr = CEGUI::WindowManager::getSingleton();
wmgr.getWindow("btn1")->
subscribeEvent(CEGUI::PushButton::EventClicked,
CEGUI::Event::Subscriber(&Event::Btn_Clicked , this));
}
bool Event::Btn_Clicked(const CEGUI::EventArgs& e)
{
std::cout << "btn1 clicked" << std::endl;
return true;
};
};