What is getter and setter in C++?

The getter function is used to retrieve the variable value and the setter function is used to set the variable value . Remember: You can directly access public member variables, but private member variables are not accessible.

Sizin İçin Seçtik  How long does it take to learn C++ after C?

Leave a Reply

Your email address will not be published. Required fields are marked *