Код: Выделить всё
$ g++ --version
g++ (Ubuntu 14.2.0-4ubuntu2) 14.2.0
Copyright (C) 2024 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
Код: Выделить всё
int i = 0x80000000;
cout
Подробнее здесь: [url]https://stackoverflow.com/questions/79450133/integer-overflow-in-expression-of-type-int-results-in-1-woverflow[/url]
Мобильная версия