+ 2
In this program i want to use the private visibility mode how i use the the private visibility mode??? And what change is occur?
2 Réponses
+ 8
default visibility mode in c++ classes is private
so in your class definition of Class A
int a is private
and in class B
int b and c is private
and if you want to specify private by your self you can write
private :
just like you wrote
public:
and the change occur is if data is private than it can only be accessible inside the class definition.
+ 3
your ans is right but i use the private visibility and what change is occur in the program