A data member that is commonly available to all objects of a class is called a static member. Unlike regular data members, static members share the memory space between all objects of the same class. (more…)
Access specifiers specify the level of access that the outside world have on the class methods and class data members. Access specifiers can either be public, private or protected.
Why do we need Access specifiers
Access specifiers are used as a key component of Encapsulation and Data Hiding. By using either of the access specifiers mentioned above i.e. public, private or protected you can hide or show the internals of your class to the outside world. (more…)