Device Monitoring Studio - Monitor, log and analyze data coming through PC ports and connections
Download Device Monitoring Studio Hide this button


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


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

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;

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.