Two C Techniques: Typedef and Switch by "Symbol"
First to summarize the usage of typedef in C/C++. The usage can be categorized into three class:
- to indicate what a variable indicates
- to simplify a declaration, i.e.
struct,class - using typedef with pointers
- using typedef with typecasting
Here are some tips:
-
basically, typedef is define a more self-explained …