|
-
April 13th, 1999, 01:25 PM
#1
C++ programming
Hi
I am trying to figure out a way to assign a derived class's member function to a base class member function pointer.
example:
class base
{
public:
double func(int i);
};
class derived: public base
{
public:
double myfunc(int j);
};
double (base::*bptr)(int);
// assign derived class's member function to base
// class's member function pointer
bptr = &derived::myfunc; // but this is illegal to do
How can I resolve this? Any pointers would be greatly appreciated. Thank you in advance for your help.
Anna
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|