I need to know where I can find info on standard fixed-size C++ types, meaning stuff like __int32 and so on but some may be compiler-dependant. It must be standard C++.
Printable View
I need to know where I can find info on standard fixed-size C++ types, meaning stuff like __int32 and so on but some may be compiler-dependant. It must be standard C++.
There is nothing standard for exact-width integers in C++.
The only guaranteed fixed-size type the C++ standard provides is sizeof(char) == 1. All the rest are compiler-dependent. On some compilers you will even find that sizeof(short)==sizeof(int)==sizeof(long)
Ouch. So what would my best way to work around this be then? Nested ifdef:s depending on compiler and system? Any info on this?