NOT SO COMMON C++ : Access Specifiers
Hello everyone , wecome to our NOT So Common C++ series. In the last post for NOT SO COMMON C++ we discussed about some shortcuts , initializations of pointers, structures ..etc. So today lets cover some tricky portions of C++ that are a bit confusing for the beginners. I hope you people have basic knowledge of class in C++. Access Specifiers : public , private , protected. Lets see an example to get an overview of access specifiers- #include<iostream> using namespace std; class Example { private : int priV ; // PRIVATE VARIABLE or PRIVATE MEMBER public : Example() //Constructor { priV = 10; ...