Previous Reference C++ Reference Main Next Reference





C++ Reference: Hungarian Notation






Type Specificiers


A — Abstract

Used with classes that have both pure virtual and
implemented functions.

Example

class CAMyAbstractClass
{
public:
    void MyDefinedFunction () {
        // Do something
    }

    virtual void MyVirtualFunction() = 0;
};

C — Class

Used for any class.

Example

class CMyClass {
    // class definition
};

E — Enumeration

Used for enumerations.

Example

enum EMyEnumeration {keValue1, keValue2};

G — Generic

Used for parameterized classes, structs, etc.

Example

template 
class CGMyGenericClass
{
    // class definition
};

I — Interface Class

Used for class with only pure virtual methods in them.

Example

class CIMyInterfaceClass
{
public:
    virtual void MyVirtualFunction() = 0;
};

M — Macro

Used for preprocessor macros.

Example

#define MMax(x, y) ((x < y) ? y : x);

N — Namespace

Used for namespaces

Example

namespace NMyNamspace {
    // namespace members
}

P — Parameter Type

Used for template parameter type

Example

template <typename PMyParam>
class CGMyGenericClass
{
    // class definition
};

S — Struct

Used for structs.

Example

struct SMyStruct {
    // struct definition
};

T — Typedef

Used for types defined by typedef.

Example

typedef CMyClass TMyTypedefType;

U — Union

Used for union types.

Example

union UMyUnion {
    int miSomeInt;
    double mdSomeDouble;
};








Type Identifiers


a — array

Example

int iaIntArray[5];

b — bool

Example

bool  bBoolean(false);

c — char

Example

char cCharacter = 'a';

d — double

Example

double dMyDouble = 2.4;

e — enumerated type

Example

EMyEnumType eEnumInstance;

f — float

Example

Float fFloat(6.2);

g — global

Example

int giGlobalInt = 0;

i — int

Example

int iInteger = 3;

k — const

Example

const double kdConstDouble = 5.0;

l — long

Example

long lLong = 4;

m — member

Example

class CMyClass
{
public:
    int miMemberInteger;
};

p — pointer

Example

int* ipIntPtr = 0;

pfn — function pointer

Example

void (*pfnPointerToFunction)(int iArg);

q — unknown programmer-defined type

Example

CPoint qMyPoint;

r — reference

Example

int& irIntReference = iInteger;

s — short

Example

short sShort = 4;

t — type

Example

class CMyClass {
    static int tiClassInt;
};

u — unsigned

Example

unsigned int uiUnsignedInt = 10;

w — wchar_t

Example

wchar_t wWideChar = L'X';

x — unspecified parameterized type

Example

template 
void MyFunction(PParam xArgument);



Previous Reference C++ Reference Main Next Reference





Home | Reference | Play Games! | Forum | Site Map | Contact Us