• We’re currently investigating an issue related to the forum theme and styling that is impacting page layout and visual formatting. The problem has been identified, and we are actively working on a resolution. There is no impact to user data or functionality, this is strictly a front-end display issue. We’ll post an update once the fix has been deployed. Thanks for your patience while we get this sorted.

I can't get my program to compile!!!

41 c:\programs\prc885~1.cpp
integer constant out of range

41 c:\programs\prc885~1.cpp
warning: decimal integer constant is so large that it is unsigned

I get those errors for variables n11 to n15. i set them as long long int, why would they still do this?

I am using Bloodshed Dev-C++ Version 4.
 
Look at the number you are using to divide X by.
You may need to recast it to a long long int.
 
Originally posted by: EagleKeeper
Look at the number you are using to divide X by.
You may need to recast it to a long long int.

I just tried that, didn't work, any other suggestions? Pleases?
 
I just tried this using VC 6.0

I changed your long long int to double.

Then at each calculation, I typecasted the result to an int

n15 = (int) (x / 1000000000000000) % 10;

Compiled fine
 
long long int isn't guaranteed to be any particular size other than bigger than or equal to the size of a long int.
 
Using doubles isn't a good idea because it'll be imprecise. Instead of dividing by ridiculously big numbers, divide by reasonable numbers (e.g. 1 billion) multiple times.
 
Back
Top