May 2017
Intermediate to advanced
590 pages
17h 18m
English
A typedef declaration introduces a synonym (or an alias in other words) for a type. It does not introduce another type (like a class, struct, union, or enum declaration). Type names introduced with a typedef declaration follow the same hiding rules as identifier names. They can also be redeclared, but only to refer to the same type (therefore, you can have valid multiple typedef declarations that introduce the same type name synonym in a translation unit as long as it is a synonym for the same type). The following are typical examples of typedef declarations:
typedef unsigned char byte; typedef unsigned char * pbyte; typedef int array_t[10]; typedef void(*fn)(byte, double); template<typename T> class foo { typedef T ...Read now
Unlock full access