I notice you more experienced programmers use typedef a lot. I have some questions:
1. When should you use typedef? When writing:
100 times can be easier expressed as:Code:std::list<myType>::iterator
2. I notice often typedefs are written at global scope. Do typedefs follow normal scoping rules? Should they typically be written at global scope?Code:typedef std::list<myType>::iterator list_itr; list_itr it = a_list.begin();
EDIT:
i guess that's actually:
Code:std::list<myType>::std::iterator