Monday, April 8, 2019

c++ faq - What does the C++ standard state the size of int, long type to be?

I'm looking for detailed information regarding the size of basic C++ types.

I know that it depends on the architecture (16 bits, 32 bits, 64 bits) and the compiler.



But are there any standards for C++?



I'm using Visual Studio 2008 on a 32-bit architecture. Here is what I get:



char  : 1 byte
short : 2 bytes
int : 4 bytes
long : 4 bytes

float : 4 bytes
double: 8 bytes


I tried to find, without much success, reliable information stating the sizes of char, short, int, long, double, float (and other types I didn't think of) under different architectures and compilers.

No comments:

Post a Comment

plot explanation - Why did Peaches' mom hang on the tree? - Movies & TV

In the middle of the movie Ice Age: Continental Drift Peaches' mom asked Peaches to go to sleep. Then, she hung on the tree. This parti...