15.3.3 Input/Output of Special Types
The standard I/O operators are provided for almost all fundamental types (excluding void and nullptr_t) as well as for char*, and void*. However, special rules apply to some of these types and to user-defined types.
Numeric Types
When reading numeric values, the input must start with at least one digit. Otherwise, the numeric value will be set to 0 and the failbit (see Section 15.4.1, page 758) is set: