Standard C++ provides a pointer-to-member mechanism for classes: Pointers 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? class C { public:

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?

This problem has been solved!


Do you need an answer to a question different from the above? Ask your question!
Related Book For  answer-question
Question Details
Chapter # 10
Section: Exercises
Problem: 27
Posted Date: November 26, 2020 01:36:38