0

How to use public private function in c++

use public privat

7th Aug 2018, 5:57 PM
Ganesh Jadhav
Ganesh Jadhav - avatar
2 Réponses
+ 2
Ganesh Jadhav generally data members are made private or protected which can be accessed using public methods.. methods can also be private or public and data member can also be public as well. refer below code to get idea : https://code.sololearn.com/cMC5mowoNF3F/?ref=app
8th Aug 2018, 1:36 AM
Ketan Lalcheta
Ketan Lalcheta - avatar
0
using access specifiers is as simple as putting the name of the specifier (public, private, etc.) before the data that you want to assign it to, example: class a { public: int b; }
7th Aug 2018, 10:03 PM
hinanawi
hinanawi - avatar