I just had some Q's about inheritance in C++.
A) The view modifier prepended before the class name that you're inheriting from, that sets a MINIMUM level of restriction, in that instance of the class, ie. if C inherits from P, and P has all private members, but it's inherited with private restriction, then the members of P are accessible from C as if they were C's private members? But if they were all public, declaring the inheritance as public won't give C access to P's private members.
B) Even if a function is private, if declared pure virtual (void function), the class is therefore abstract and cannot be instantiated, right? So what would the point of writing a function that's pure virtual without code under a private visbility in a parent class be?? I have some code that I didn't write (but I can't post here ) that has that, and I'm trying to figure out the rationale behind it. There's no way a child could implement that, it's private, right?
Thanks for your time!!!