C++ Variable Prefixes -- e.g. m_iVariable
Posted on 2003-03-24
To all industry experts,
I am a 2nd year college student currently studying computer science. Now that my basics classes are over, I am starting to develop more complex applications. I stumbled across generation5.org's wonderful essays on neural networks. While I was browsing the sample code, I noticed that the programmer(s) chose to prefix all member variables with an "m_" and then, I think, their type -- i,f,c,p,str. My question is, is this a common practice that I should be getting into the habbit of doing? I noticed the MFC code generated by Visual C++ uses prefixes, though not those. If you youself use the prefixes in your code, would you be kind enough to give a list of the ones you use and their meaning (if it isn't obvious). High points for this question, because 1) it has been bugging me for a while now, and 2) I don't want the so-called experts to pass up this "beginner" question. Thanks in advance.