Basically as far as I know, when you create a base class with a public, protected, and private section and variables/functions in each the public and protected sections will
This may help
#include using namespace std; class A { int b; }; class B : private A { }; int main() { C obj; cout<