Mail Archives: djgpp/1994/12/03/01:18:04
I was wondering if anyone knew a good method to pass member functions
to something.
if I want to develop a generic list of pointers to functions, that say draw_me();
is there any way to do this?
What I am doing know is this,
the list stores two things, the address of the of member (a s a void)
and an integer identifier.
e.g. to call,
switch (ID)
case BOX : ( (box *)dummyPointer)->draw(); breajk
case CIRCLE : ( (circle *)dummyPointer)->draw(); break;
etc.
I have heard that C++ functions are just liked dos functions in which the
first parameter is "this" is this always the case? Is there a way to
take advantage of this?
--
|\___
|O.o/
David Wu =(___)= Don't Drink
U and Derive
Disclaimer: This message may not be politically correct.
The message may not be grammatically correct.
- Raw text -