liveBook · Manning

Typedef

typedef is a C and C++ declaration mechanism that introduces an alternative name for an existing type.

How 2 Manning books explain it

Modern C, Third Edition

A typedef is a C declaration that introduces an alias for an existing type.

How it is used
Uses aliases to simplify structure names, represent semantic types, and make multidimensional array declarations more readable.
How deep it goes
Explains aliasing, structure forward declarations, arrays, reserved names, and semantic typedefs, without descending into compiler implementation.
Examples
Demonstrates structure aliases, array aliases, multidimensional arrays, and implementation-provided names including size_t and ptrdiff_t.
What you can do after
Apply typedef to name existing structure, array, and implementation-provided types while preserving type identity and naming constraints.

Read how Modern C, Third Edition explains typedef →

Modern C

A typedef is a C declaration that introduces an alias for an existing type.

How it is used
Simplifies repeated type declarations, especially structure names and interfaces.
How deep it goes
Defines alias semantics and demonstrates structures, arrays, forward declarations, and pointer-visibility tradeoffs.
Examples
Uses same-name structure aliases, opaque structure interfaces, and nested array aliases as concrete declaration patterns.
What you can do after
Apply it to shorten declarations while preserving the underlying type and keeping important pointer syntax visible.

Read how Modern C explains typedef →

Related concepts

These guides are generated from the text of Manning books by Manning's knowledge graph and link to the sections they draw on. The full books are available on liveBook and at manning.com.