Vijay Rajanna
Vijay Rajanna

Reputation: 41

How Data type sizes differ for C or C++ languages based on 32 bit and 64 bit systems

I have few basic questions regarding the size of data types for C and C++ languages on 32 bit and 64 bit systems. I have failed to get a convincing answer on net for the same, and my questions are.

Thanks in advance.

Regards, Vijay.

Upvotes: 2

Views: 6402

Answers (1)

user529758
user529758

Reputation:

They practically depend on everything, maybe even on compiler flags, so don't make assumptions. Either lool up the documentation of the platforms you target, or (in case of integers) use the fixed-width standard types (<stdint.h> in C, <cstdint> in C++).

Upvotes: 2

Related Questions