2. Someone has done the test, as shown in the following figure:
According to the above figure, the following points can be drawn:
A: long long definition can be used for gcc/g++ and is not limited by the platform, but it cannot be used for VC6.0.
B:__int64 is a 64-bit long integer defined by Win32 platform compiler, and cannot be used for Linux.
C: "%lld" is used for Linux i386 platform compiler and "%I64d" is used for Win32 platform compiler.
D:cout can only be used for C++ compilation. In VC6.0, cout does not support 64-bit long integers.
3. If you want to use 64-bit integers, try to use the latest compilers and Windows platforms, and try to use newer versions of VS and Linux platforms. It is recommended to upgrade gcc/g++ to the latest version.