Hungarian Notation
Charles Simonyi is credited with first discussing Hungarian Notation. It is a variable naming convention that includes C information about the variable in its name (such as data type, whether it is a reference variable or a constant variable, etc). Every company and programmer Seems to Have The Their Own Flavor of Hungarian NOTATION. The Following Is Just What We Thought Seemed Easy for Beginning Students To Understand.
PrefixTypeExampleb boolean bool bStillGoing; c character char cLetterGrade; str C String string strFirstName; si short integer short siChairs; i integer int iCars; li long integer long liStars; f floating point float fPercent; d double-precision floating point double dMiles; ld long double-precision floating point long double ldLightYears; sz Old-Style Null Terminated String char szName [nAME_LEN]; if Input File Stream ifstream ifNameFile; is Input Stream void fct (istream & risIn); of Output File Stream ofstream ofNameFile; os Output Stream void fct (ostream & rosIn); S declaring a struct struct SPoint {C declaring a class class CPerson {struct name or abbrev declaring an instance of a struct SPoint pointLeft; SPoint ptLeft; // or abbrev (be consistent) class name or abbrev declaring. AN Instance of a class CPERSON PERSONFOUND; CPERSON Perfound; // OR Abbrev. (be consistent)
The Following Table Contains Letters That Go Before The Above Prefixes.