c++ - Is it a good style to use this to refer private member in the class? -
i have class
class t { private: int x; public: int getx() { return this->x; } } is use this->x rather x itself?
no. perhaps use m_x instead. signify member variable.
perhaps read use of const
Comments
Post a Comment