[Solved] Unveiling Shadowed Inherited members | Sololearn: Learn to code for FREE!
¡Nuevo curso! ¡Todo programador debería aprender IA Generativa!
Prueba una lección gratuita
+ 2

[Solved] Unveiling Shadowed Inherited members

In the following code how to access the derv() function of the base class x from object of class y https://code.sololearn.com/cihgu7AoX0CR/?ref=app

7th Oct 2018, 5:14 PM
Saurabh Tiwari
Saurabh Tiwari - avatar
3 Respuestas
+ 5
((x)a).derv(); will call it from main.
7th Oct 2018, 5:40 PM
John Wells
John Wells - avatar
+ 4
x::derv(); will call it from y::derv.
7th Oct 2018, 5:42 PM
John Wells
John Wells - avatar
+ 3
John Wells thank you sir
7th Oct 2018, 5:44 PM
Saurabh Tiwari
Saurabh Tiwari - avatar