C Lecture 8
[Previous Lecture]
[Lecture Index]
typedef
typedef type-declaration new-type;
typedef short int16;
typedef struct foo Foo;
typedef struct foo *Foo_p;
int16 i;
Foo f;
Foo_p p;
- used to create new type
- uses:
- less typing (Foo instead of struct foo)
- ease configuration: single point of change
- can make code easier to understand
[Previous Lecture]
[Lecture Index]