convert from long long to int and the other way back in c++
问题 How to convert from long long to int and the other way back in c++ ?? also what are the properties of long long , especially its maximum size, thank in advance .. 回答1: Type long long is typically 64 bits. Type int is likely to be 32 bits, but not on all machines. If you cast an int to a long long, you can do my_long_long = (long long) my_int and it will be just fine. If you go the other direction, like my_int = (int) my_long_long and the int is smaller than 64-bits, it won't be able to hold