December 2018
Intermediate to advanced
702 pages
20h 9m
English
The auto specifier is basically a placeholder for an actual type. When using auto, the compiler deduces the actual type from the following instances:
In some cases, it is necessary to commit to a specific type. For instance, in the preceding example, the compiler deduces the type of s to be char const *. If the intention was to have a std::string, then the type must be specified explicitly. Similarly, the type of v was deduced as std::initializer_list<int>. However, the ...
Read now
Unlock full access