variable sizes

Write your question here.



my problem is a very simple one. we all know that in c that we could initialize a variable like long long and the capacity of the new variable would be twice big than normal long variable. and in c++ this doesn't work. and the capacity of int and long are same. in this case how can I store something big in a variable please tell me.
use double or long double
capacity of int and long are same
Use long long as you would in C

About sizes:
int:       at least 16 bit, usually 32
long:      at least 32 bit, usually 32 on win machines and 64 on Linux
long long: at least 64 bit


Do not use doubles to store large integers, or you may run into precision issues when you do some operations.
Last edited on
Topic archived. No new replies allowed.