Accessing private and protected members
How can we access protected and private members of a class in C++?
- 5178 Views
- 1 Answers
1 Answers
-
-
- 21 Jul
- 0 Comment
-
- When we already have C language then why C++?
- What is C++ programming language used for?
- Online test for C plus plus language
- What are tips for someone whose learning C++?
- Reallocation of pointers in C++
- What are the five basic elements of a C++ program?
- What is difference between C and C++ ?
- Which is the best software for C++ programming?
- Difference between class and struct?
- Is Python better than C++? Explain your answer
Practice Mock Test
c plus plus programming
you can access the private members within the class only. private members are hidden from the other classes. and Protected members are only accessible by that class as well as its subclasses only. and public members are accessible by all the classes.