Last modified on May 27th, 2019
Private member access specifiers, Protected member access specifiers, Public member access specifiers in OOP C++
In this tutorial, we will learn about the followings;
What is member access specifier in OOP C++?
What is private access specifier in OOP C++?
What is protected access specifier in OOP C++?
What is public access specifier in OOP C++?
What are member access specifiers?
Members access specifiers are the instructions that controls the access of all members including attributes and functions.
There are 3 types of member access specifiers’
1.Private access specifier:
Private members are only accessible inside their own class
2. Protected access specifier:
Protected members are accessible within the class and within its derived/child classes.
3. Public access specifier:
Public members are accessible within the class and also outside the class.
How are private protected and public declared within the class?