*уходит, открывая бутылку водки*
Floating–integral conversions A prvalue of floating-point type can be converted to a prvalue of any integer type. The fractional part is truncated, that is, the fractional part is discarded. If the value cannot fit into the destination type, the behavior is undefined (even when the destination type is unsigned, modulo arithmetic does not apply). If the destination type is bool, this is a boolean conversion (see below). (c) https://en.cppreference.com/w/cpp/language/implicit_conversion
Обсуждают сегодня