From: "Floris van den Berg" Newsgroups: comp.os.msdos.djgpp Subject: allegro timer pointed to object Date: 30 Dec 1998 23:09:10 GMT Organization: News Service (http://www.news-service.com/) Lines: 35 Message-ID: <01be3449$ff7d20c0$617e97c2@fvdberg.magenta.com> NNTP-Posting-Host: 194.151.126.97 X-Newsreader: Microsoft Internet News 4.70.1155 To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Reply-To: djgpp AT delorie DOT com Anyone ever tried to let the timer of allegro point to a object method? I have a small snippet that compiles, but crashes when i start it. class Oallegro { public: Oallegro(int width, int height, int bitdepth); ~Oallegro(); void breathe(); void unbreathe(); void messagepump(); }; void Oallegro::breathe() { install_int_ex(Oallegro::messagepump, MSEC_TO_TIMER(20)); } void Oallegro::unbreathe() { remove_int(Oallegro::messagepump); } void Oallegro::messagepump() { handlemouse(); } Everything goes wrong when messagepump() is called. When i put a simple printf into the method, there's no problem at all. But when i do something with variables or call one of my other (virtual) classes, the program crashes. Please help! Floris