Naming convention for params of ctors and setters
问题 For those of you who name you member variables with no special notation like m_foo or foo_ , how do you name parameters to your ctors and setters? Some options I've tried so far... Obj(int foo) : foo(foo) { } void set_foo(int foo) { this->foo = foo; } Obj(int _foo) : foo(_foo) { } void set_foo(int _foo) { foo = _foo; } Obj(int a_foo) : foo(a_foo) { } // a for "argument" void set_foo(int a_foo) { foo = a_foo; } Obj(int init_foo) : foo(init_foo) { } void set_foo(int new_foo) { foo = new_foo; }