Commonly Accepted Variable Name Formatting - C/C++ -
i realize can matter of preference, have noticed variables names in lot of code samples i've seen have prefix of g_
, s_
, m_
, or _
. commonly accepted practice, , these prefixes mean? there others know?
g_
global variables_
staticm_
member (an instance variable)_
either member, or more private member (both usages turn up)
this common enough many developers know it, although not (to knowledge) universally accepted. don't think missing others.
update: integrating comments below better visibility
_
can used denote local variable (this 1 isn't "standard")k
can used denote constant
Comments
Post a Comment