Is using underscore suffix for members beneficial?

后端 未结 13 2057
猫巷女王i
猫巷女王i 2020-12-29 03:58
class C {
 private:
  int member_; // here is the underscore I refer to.
}

This underscore is recommended by Google Style Guide and Geosoft\'s C++

13条回答
  •  有刺的猬
    2020-12-29 04:43

    there is one more "style" which suggests declaring class members as below:

    class Foo{
        int m_value;
    public:
         //...
    };
    

    i found it usable. but it is just my point of view.

提交回复
热议问题