-
Naming Scheme...
The default template for a windows program that Dev-C++ gives me has the window class name by default be "szClassName". The winprog.net one uses "g_szClassName" for one and "g_hbmBall" as a name for an HBITMAP. I know it's ultimately arbitrary, but what's the pattern, exactly?
-
Is the stuff preceded by g_ global?
-
Why yes it is. How about the sz?
-
A string terminated by zero (null).
http://en.wikipedia.org/wiki/Hungarian_notation
[I'm not a fan.]
-
-
Hungarian notation can be handy, more so in C than C++ (IMO).
I can have many variables with the same name but differing types. This is so I know where the are used and have to be freed.
For example, if I have a device context (DC) for drawing say a graph.
hdcGraph //the handle device contex I am using
hbmpGraph //the handle to the compatible BMP i have created
hfntGraph //the handle to the font the graph uses
-
My example of why I don't like them is this: u_int16_t. What the hell is the type???
[You can search the forum for my previous reply.]