Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

variable prefixes 1

Status
Not open for further replies.

peterworth

Programmer
Aug 18, 2004
80
GB
Variables with names like lpzFoo or m_nBar - is there an accepted standard for the prefixes? if so is there somewhere on line with the meaning of each?
 
It's old Microsoft (only?) code convention, so called Hungarian notation.
There are many articles in MSDN on this topic.
I don't like it, that's all.
 
p = pointer.
sz = zero delimited string (i.e. char*).
m_ = member variable of a class.
sm_ = static member variable.
g_ = global variable.
i = int.
l = long.
u = unsigned.
f = float.
d = double.
b = bool.
n = counter.
lp = long pointer (which doesn't mean much anymore).
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top