Mail Archives: djgpp/1997/01/16/12:16:30
Moo-Juice (Ben AT flag DOT demon DOT co DOT uk) wrote:
: Hi,
: I've been having some trouble installing timers in Allegro, using a
: public class member function as the argument.
: Supplying a standard function as the parameter works, but if I pass a
: class member function it doesn't like it at all. Is there a work around
: for this?
: --
: Moo-Juice
The problem is that a class member function has an implicit extra
parameter that a global function doesn't have: the "this" pointer. Declare
the member function as being "static" and it won't be passed a this pointer,
which will make it equivalent to a global function.
- Raw text -