Which call is correct for public members of a nested class?

Ngọc Trâm

New member
Which call is correct for public members of a nested class?
A. Can be called from object of enclosing class
B. Can be called within enclosing class only with direct names
C. Direct names should be used for the nested classes
D. Only with help of nested class object pointer
 
Answer: a
Explanation: The closest definition is that any public member function of the nested class can be accessed with the help of enclosing class object. The nested class object pointer can be used only within the enclosing class. It’s not mandatory to use the members of nested class only within the enclosing class.
 

Tìm kiếm

Back
Top