c++ - Representation of Long Integers -


possible duplicate:
what difference between int , long in c++?

#include <iostream>  int main() {     std::cout << sizeof(int) << std::endl;     std::cout << sizeof(long int) << std::endl; } 

output:

4 4 

how possible? shouldn't long int bigger in size int?

the guarantees have are:

sizeof(int) <= sizeof(long)  sizeof(int)   * char_bits >= 16 sizeof(long)  * char_bits >= 32 char_bits                 >= 8 

all these conditions met with:

sizeof(int)  == 4 sizeof(long) == 4 

Comments

Popular posts from this blog

apache - Add omitted ? to URLs -

redirect - bbPress Forum - rewrite to wwww.mysite prohibits login -

php - How can I stop spam on my custom forum/blog? -