<<Depth Exploration C ++ Model>> Question (Chapter 3) (Medium)

zhaozj2021-02-11  176

3.3 Access to Data MEMBER

1. Access Static Data MEMBER must pass the pointer or an object, why? (P95)

2. Has multiple inheritance or virtual inheritance affects STATIC DATA MEMBER? (P96)

3. Take a Static Data MEMBER address, will you get a type? (P96)

4. If two classes, each declare a STATIC DATA MEMBER of the same name, how do the compiler handle? (P97)

5. Access a Data MEMBER through a pointer or an object, what is the difference? (P99)

3.4 Inheriting and Data Member

1. Why is the base class object included in the Derived Class Object, which is not used by the DeriveD Class Object for the additional bytes of the boundary alignment? (P105-P106)

2. If there is a Virtual Function in a Class, then those extra burden will it? (P108).

3. If you are interested, please answer this topic:

Where is the best to put the VPTR in Class Object? What impact will there be? (P110-P111).

4. In the case of multiple inheritance, it is different when converting a Derived Class Pointer to the leftmost base class and the rightmost pointer to the pointer of the base Class.

5. How is BJARNE handled virtual inheritance? (P121-P123)

转载请注明原文地址:https://www.9cbs.com/read-4938.html

New Post(0)