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 Answers
New Answerhttps://code.sololearn.com/cofuy8lNWx6m/?ref=app
6/12/2018 3:27:48 PM
Devang H Baroliya2 Answers
New Answerdefault 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.
your ans is right but i use the private visibility and what change is occur in the program
Sololearn Inc.
535 Mission Street, Suite 1591Send us a message