Standard C++ provides a pointer-to-member mechanism for classes: Pointers to members are also permitted for subroutine members

Question:

Standard C++ provides a “pointer-to-member” mechanism for classes:

class C { public: int a; int b; } c; int C::*pm // pm points to member a of an (arbitrary)C object &C::a; C* P &c; %3D 3; // assign 3 into c.a p->*pm %3DPointers to members are also permitted for subroutine members (methods), including virtual methods. How would you implement pointers to virtual methods in the presence of C++-style multiple inheritance?

Fantastic news! We've Found the answer you've been seeking!

Step by Step Answer:

Related Book For  book-img-for-question
Question Posted: