Typedef

From Tux
Revision as of 13:23, 27 January 2018 by Williams (talk | contribs) (Created page with "'''<code>typedef</code>''' can be used to rename a data type. <source lang="cpp"> typedef unsigned long int myint; // The following two variable declarations are equivalent...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

typedef can be used to rename a data type.

typedef unsigned long int myint;

// The following two variable declarations are equivalent given the above typedef
unsigned long int x;
myint x;

typedef statements can be made global.