Original Post
Which integer data types are always 32-bit (like __int32) and which are 64-bit (like __int64) both on the 32-bit gcc compiler and the 64-bit compiler? Thanks.
#include <stdint.h>int32_t signed_32_bit_integer;int64_t signed_64_bit_integer;uint32_t unsigned_32_bit_integer;uint64_t unsigned_64_bit_integer;Quote:
Original post by smart_idiot
*** Source Snippet Removed ***
The 64 bit versions aren't actually required to be there if the compiler doesn't have a native type that can hold such a number (like an old 16 bit compiler), but you're probably safe.
Quote:Now the question is, does this depend on what target machine you specify, or what machine you compile on.
Original post by Evil Steve
According to another user (Pouya), on his 64-bit machine, sizeof(int) was 4 (32-bits) and sizeof(long) was 8 (64-bits).
This topic has been locked by a moderator. New replies are not allowed.
With your permission, GameDev.net uses analytics cookies to understand how people use the platform. You can accept analytics or continue with necessary cookies only. Learn more