July 2020
Beginner
301 pages
3h 36m
English
We can automatically deduce the type of an object using the auto specifier. The auto specifier deduces the type of an object based on the object’s initializer type.
This example deduces c to be of type char as the initializer 'a' is of type char.
Here, the compiler deduces the x to be of type int because an integer literal 123 is of type int.
This example deduces d to be of type double ...