Access Specifiers (modifiers) in C++

Access specifiers , access modifiers or visibility modes are different words used for the same purpose to show the access level of data in c++ for various purposes. These are used for data hiding. Here, are the three types of access modifiers. Public Private Protected 1. Public If the data members are declared public access then they can be accessed from other functions out side the class. It is declared by the key word “public”. 2. Private If the data members are declared as private access then they cannot be…

Read More