Stumbled upon these doing a review of new hire questions from (2000) and am stumped; never worried about these situations.
Are they real world or just hypothetical - my C++ training is not academic?
Generic version of the max function, for use with most any data type
Where types can be morphed, how is this really possible/practical 😕
Class A { };
Class B1 : public A { };
Class B2 : public A { };
Class C : public B1, public B2 { };
B1 inherits a virtual public A, and B2 inherits a virtual private A! What access rights does C have to As members?
Why would this be and what would be the benefit. I have always felt that when you get too fancy, it becomes hard to understand the resulting concept
Are they real world or just hypothetical - my C++ training is not academic?
Generic version of the max function, for use with most any data type
Where types can be morphed, how is this really possible/practical 😕
Class A { };
Class B1 : public A { };
Class B2 : public A { };
Class C : public B1, public B2 { };
B1 inherits a virtual public A, and B2 inherits a virtual private A! What access rights does C have to As members?
Why would this be and what would be the benefit. I have always felt that when you get too fancy, it becomes hard to understand the resulting concept
Last edited: