Re: grid
- From: "Tom Serface" <tom.nospam@xxxxxxxxxxxxx>
- Date: Wed, 25 Apr 2007 06:28:42 -0700
The good news is we're allowed to name things whatever we'd like (for the most part). My class member declarations are typically in a different file (.h) from the code (.cpp) so having the m_ to tell the difference between members and auto variables makes sense to me. In fact, I often use the same name for both in something like:
void SetMyVariable(LPCTSTR csMyVariable) {m_csMyVariable = csMyVariable;};
Of course functions like this are easy to figure out since they are all together, but when the function is in a different file and more complex I typically do the same sort of thing.
Tom
"Joseph M. Newcomer" <newcomer@xxxxxxxxxxxx> wrote in message news:ls9t239id7p4rpal69hn4vd485flpbembt@xxxxxxxxxx
m_ is common use, but largely irrelevant. I rarely use it. If your classes are so
complex that this becomes an issue, it is perhaps time to rethink the design.
this-> is not related to m_, and in general, the explicit use of this-> is more an
affectation than an indicator of good style.
Since my declarations are rarely more than a few lines of code from their use, there seems
to be little reason to worry about naming conventions for local variables.
joe
On Mon, 23 Apr 2007 14:40:35 GMT, MrAsm <mrasm@xxxxxxx> wrote:
.
- References: