Hex Editor - Binary File Editing Software for Windows
Download Hex Editor Neo Hide this button

Typedefs

You can create an alias for any built-in or user-defined type.

Syntax:

typedef existing-type new-type-id [,new-type-id …];
using new-type-id = existing-type;

Type alias definitions are allowed at any scope. existing-type must be either built-in type, enumeration or user-defined type. Nameless types are allowed.

typedef int INT;
typedef struct { int a,b; } MyStruct;

struct A
{
    // …
};

typedef A B,C,D;
using E = A;

Typedef does not create a new type, it only creates an alias for an existing type. You may reference a type by its original name, or by one of its aliases.