December 2001
Intermediate to advanced
304 pages
6h 25m
English
TypedefDifficulty: 3
Why use typedef? Besides the many traditional reasons, we'll consider typedef techniques that make using the C++ standard library safer and easier.
Why use typedef? Name as many situations/reasons as you can.
Why is typedef such a good idea in code that uses standard (STL) containers?
Typedef: Controlling What's in a NameTo recap, writing typedef allows you to assign another equivalent name for a type. For example,
typedef vector< vector<int> > IntMatrix;
lets you write the simpler IntMatrix in place of the more verbose vector< vector<int> >.
1. Why use typedef? Name as many situations/reasons as you can.
Here ...
Read now
Unlock full access