Mail Archives: djgpp/1994/08/11/20:15:59
On Thu, 11 Aug 1994, William Hughes wrote:
[code deleted]
> Note that this works fine if myfunc is not within the class,
> but someone else's function. It only gripes when myfunc is
> part of the class.
> Should this be happening, or am I just abusing the structure of c++
> way, way, way too much...?
I'm afraid you're abusing the structure of c++. The problem is that
myfunc is of type "void (x::*)(void)" not "void (*)(void)".
I.e., pointers to (nonstatic) member functions and pointers to
nonmember functions do not mix. This is partly because member
functions take an implicit "this" pointer which regular functions
do not have.
Gordon
- Raw text -