What are acess labels in a class in c++? | Sololearn: Learn to code for FREE!

+1

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

6/18/2017 4:05:40 AM

Mrunal Singh

2 Answers

New Answer

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

+1