C++ getters and setters best style
in Java code convention is simple and obvious, in this style: public: int GetMyAge(){ return myAge; } void SetMyAge(int myAge){ this->myAge = myAge; } private: int myAge; (I know it's "again the same thing", but ) I have read most of related questions on SO and I still don't know "the best one" and "the most official" way to do it in C++. It can't be just a matter of preferences, can it ? EDIT: Seems like it can . The best style is the one that allows you and your team to make quality software that your clients continue to pay you for. How does this style work for you and your team? Do you