I know that in Unixes/Linuxes the long
size is 64bit.
But when using the same under the windows (x64) the long
is always 32bit.
Is there any workaround/library that enable the use of larger integers in C ?
I know that in Unixes/Linuxes the long
size is 64bit.
But when using the same under the windows (x64) the long
is always 32bit.
Is there any workaround/library that enable the use of larger integers in C ?
Under C99, you have two possibilities
long long
, since it is required to be at least 64-bitint64_t
, or int_least64_t
, from stdint.h
In the second approach, you may find it useful to combine with inttypes.h
, which adds portable formatting and conversion functions, but note that while stdint.h
is required in both hosted and freestanding implementations, inttypes.h
is only required in hosted implementations.
Also, exactly which types are defined in stdint.h
is implementation-defined in some cases, but if a type is defined, then both signed and unsigned versions must exist.