Private inheritance | Sololearn: Learn to code for FREE!
Novo curso! Todo programador deveria aprender IA generativa!
Experimente uma aula grƔtis
+ 1

Private inheritance

If base class X has an attribute int a as private and i have class Y inherited from class X , how do i initialize a in Yā€™s constructor in the initialization list.

20th Feb 2020, 1:11 AM
Mohamad Moussa
Mohamad Moussa - avatar
2 Respostas
0
does this manipulation overshadows the value of a in the base class X?
20th Feb 2020, 2:04 AM
Mohamad Moussa
Mohamad Moussa - avatar
0
okay ty
20th Feb 2020, 2:20 AM
Mohamad Moussa
Mohamad Moussa - avatar