ArduinoCore-sam
ArduinoCore-sam copied to clipboard
Arduino Zero (SAM) SerialUSB.print(-2147483648);
Printing at the Arduino Zero (SAM) gives an error with:
SerialUSB.print(-2147483648);
Error message: exit status 1 call of overloaded 'print(long long int)' is ambiguous
This goes well: int s = -2147483648; SerialUSB << s << endl;
Arduino Zero (SAM)
SAMD actually.
The type of -2147483648 is long long int
, because 2147483648 does not fit into int
or long int
. The sign is not part of the constant, but an unary operator. There is no print(long long int)
in the Print
class.