[Solved] access protected variable in derived class c++
You don’t have a clear concept in object oriented programming. When you create two objects, then they are completely different from each other. They do not interact with each other until they are forced.So, myMum and myDaughter are seperate objects and they do not share the values of their variables. The last two outputs are … Read more