+ 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?

https://code.sololearn.com/cofuy8lNWx6m/?ref=app

12th Jun 2018, 3:27 PM
Devang H Baroliya
Devang H Baroliya - avatar
2 Respuestas
+ 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.
12th Jun 2018, 5:48 PM
Tanay
Tanay - avatar
+ 3
your ans is right but i use the private visibility and what change is occur in the program
13th Jun 2018, 3:36 AM
Devang H Baroliya
Devang H Baroliya - avatar