class C {
private:
int member_; // here is the underscore I refer to.
}
This underscore is recommended by Google Style Guide and Geosoft\'s C++
Well since no one mentioned it: adding an underscore to member variable allows you to name your getter and setter with the 'conceptual' name of the variable.
ex:
class MyClass
{
int someMember_;
public:
int someMember() const { return someMember_; }
void someMember( int newValue ) { someMember_ = newValue; }
};
not that I use this style though.