Mail Archives: djgpp/1994/08/15/06:28:23
> Thanks to all those who responded to my question about the function
> pointers internal to classes. The solution was: don't do that.
> I'm still going to try to explicitly cast the 'this' pointer,
> which I had forgotten about. There just has to be a way, in the end,
> its just a function address ... Ooh Ick.
>
Don't try to cast a pointer-to-member to a pointer-to-function, the
result is undefined. The ONLY ways around are to use a static member or
a non-class wrapper function. For more info see Marshall Cline's
excellent C++ FAQ available on comp.lang.c++. (In particular Section
17).
Paul.
--
Paul Harness, | Internet: gapa83 AT udcf DOT gla DOT ac DOT uk
Department of Physics and Astronomy, |
University of Glasgow, | Tel +44-41-339-8855 ext 8359
Glasgow, G12 8QQ, SCOTLAND. | Fax +44-41-334-9029
- Raw text -