operating and printing with 64-bit numbers
Posted: Wed May 14, 2008 8:55 am
Hi,
I'm trying to work with 64-bit numbers.
I declared my variable as "long long": long long decimal_place;
then I assign it a value: decimal_place = 1000000000000; // The 1 exp 12 is the largest decimal place for a 40-bit number
but I get a compiler error: integer constant is too large for 'long' type.
Why?
After I get this resolved, I want to print the value to the screen.
How do I that?
Thanks,
Victor
I'm trying to work with 64-bit numbers.
I declared my variable as "long long": long long decimal_place;
then I assign it a value: decimal_place = 1000000000000; // The 1 exp 12 is the largest decimal place for a 40-bit number
but I get a compiler error: integer constant is too large for 'long' type.
Why?
After I get this resolved, I want to print the value to the screen.
How do I that?
Thanks,
Victor