+ 3
How can we access private mode inheritance i.e. class B: private A
3 Antworten
+ 6
Class B: private A{};
will make the public,protected data and members of class A... private to class B
i.e
class A {
public:
int a;
void welcome(){cout<<"hi";}
};
class B : private A{};
means
class B{
private:
int a;
void welcome(){cout<<"hi";}
};
use
Friend Functions!!
+ 2
http://www.cplusplus.com/forum/beginner/12899/
Don't worry, I don't think I understand it either.
+ 1
objects a