Accessing private and protected members

How can we access protected and private members of a class in C++?

  • Rahul
  • 29 अगस्त
  • 4873 दृश्य
  • 1 उत्तर
Your Answer

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.

1
c plus plus programming
मॉक परीक्षण अभ्यास के लिए
c plus plus programming