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?>
I used to follow the Microsoft convention of prefixing member variables with m_
, like m_foo
. At my current company the convention is a trailing underscore for member variables: foo_
.
Generally, if you are working by yourself, then use whatever convention you like. If you are working in a team, use whatever the team agrees upon. Overall consistency in a code base is what is important, not the particular convention.