Hungarian notation in C++ (is it used or not today, and if so, how?)

From: Colin Girling (colin_at_colingirling.my-bulldog.com)
Date: 10/27/04


Date: Wed, 27 Oct 2004 17:34:15 +0100

I had another discussion going about the use of Hungarian notation, and
pointed out that all the companies I have worked for in the last 15 years
have been useing this.
If this is no longer used, what is used (or do people use nothing and just
guess on the data type?)

Also, I discovered there didn't seem to be any one standard, but many
variations.

The prefixes I am familiar with are these:

p (pointer)
c (constant)
s (string)
sz (null terminated string)
l (long)
u (unsigned), ul meaing unsinged long
i (int)
n (any integer type number)
d (double)
f (float or flag, varies)
by (unsigned char, or byte)
c (char)
g or g_ (sometimes used for global)
m_ (member variable)

Any comments would be welcome, as I am always interested to hear what other
people are using (if anything?)
Thanks.



Relevant Pages

  • Re: Hungarian notation in C++ (is it used or not today, and if so, how?)
    ... > guess on the data type?) ... > p (pointer) ... > sz (null terminated string) ... > by (unsigned char, or byte) ...
    (alt.comp.lang.learn.c-cpp)
  • Re: What could the compiler be possibly complaining about
    ... The data type for logic_value is a unsigned char ... That warning sometimes comes up when you compare variables of different sizes. ... To illustrate what is happening here, consider an unsigned char. ...
    (comp.lang.c)
  • Re: Find the Data Type of Variable
    ... > I think it is compiler dependent but if you can find the size of the ... you can find the data type. ... something that's 4 bytes on one system I use might be any of: int unsigned int long unsigned long float shortunsigned shortcharunsigned char[4] signed charstruct among almost infinitely many other possibilities. ...
    (comp.lang.c)
  • RE: char[4] data type in c for storing IPs - VB.NET equivalence
    ... 'unsigned char' is Byte in VB. ... C++ to Java ... Next is the data type definition ... Public IP As String ...
    (microsoft.public.dotnet.languages.vb)
  • 32 bit pointer to 64 bit pointer
    ... I am porting a 32-bit application to 64-bit application (AMD). ... In 64 bit AMD programming the data type unsigned INT_PTR (unsigned ... What should be the data type for unsigned char* ...
    (comp.lang.cpp)