What are acess labels in a class in c++? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 1

What are acess labels in a class in c++?

18th Jun 2017, 4:05 AM
Mrunal Singh
Mrunal Singh - avatar
2 Answers
+ 6
There are three access labels (also called access specifiers). They are : Public Protected and Private. private object can be accessed by base only. protected object can be accessed by base and any class derived from base. public object can be accessed by anything. These are just the specifiers that restrict the usage of variables or objects according to the wish of the programmer! Hope it helps!
18th Jun 2017, 4:18 AM
Vivek Vamsi
Vivek Vamsi - avatar
+ 1
thanks
18th Jun 2017, 4:18 AM
Mrunal Singh
Mrunal Singh - avatar