Hello,
I've been trying to wrap my mind around the concept of accessing the private data members of the Derived Class From the Base Class, without using protected as I've heard that there is a more effective way to access private data members. I've seen it done using the overloaded constructor and would like to know if anyone can explain or guide me to a detailed tutorial about how to do this. I hope my explanation is clear enough to understand what I mean. Sometimes my terms are off.
Thank you,
1 2 3 4 5 6
//The overloaded constructor looked something like this
ClassName::ClassName(int a, string b, string c) :somethingHere(someVariableHere){
}
Sorry, I understand exactly what you are saying @keskiverto, give me a little time to compile some code and i'll get back with a better example.
Thanks,
Update: @keskiverto, actually it turns out after rearranging some of the member functions and placing them inside of the Base instead of the Derived, I was able to think my way through it. Thank you for helping me look at things in a different way.