It’s common in C++ to name member variables with some kind of prefix to denote the fact that they’re member variables, rather than local variables or parameters. If you’ve come from an MFC background, you’ll probably use m_foo
. I’ve also seen myFoo
occasionally.
C# (or possibly just .NET) seems to recommend using just an underscore, as in _foo
. Is this allowed by the C++ standard?