August 2020
Beginner to intermediate
653 pages
16h 55m
English
Using types such as std::vector<std::string>::size_type or std::map<std::string, int>::iterator can be clumsy, prone to typographical errors, and just plain annoying to type and read. C++ lets you get away with auto sometimes, but not always. Fortunately, C++ lets you define short synonyms for clumsy types. You can also use type synonyms to provide meaningful names for generic types. (The standard library has quite a few synonyms of the latter variety.) These synonyms are often referred to as typedefs, because you can define them with the typedef keyword, although in modern C++, the using keyword is ...