Example & Tutorial understanding programming in easy ways.

What is the Access modifier in C++ ?

What is Access modifier?
in C++, there are 3 access modifier, i.e., public, private, protected.

Why Access modifier is used?
Access modifiers are used to implement an important feature of Object-Oriented Programming known as Data Hiding.

What is 'public' modifier:
Data member and data method which are declared as public are accessible from anywhere(inside or outside class).

What is 'private' modifier:
Data member and data method which are declared as private are accessible only within class.

What is 'protected' modifier:
Data member and data method which are declared as protected are accessible in same class or child class.




Read More →
Search
R4R Team
R4Rin Top Tutorials are Core Java,Hibernate ,Spring,Sturts.The content on R4R.in website is done by expert team not only with the help of books but along with the strong professional knowledge in all context like coding,designing, marketing,etc!