[ACCEPTED]-integer constant is too large for "long" type-dev-c++
Accepted answer
Try an "ULL" suffix: 600851475143ULL
0
Your literal as typed has type int
which isn't 5 big enough to hold the value. Try 600851475143ULL
as a 4 first fix.
Note even with that, your for
loop 3 will never terminate since an unsigned can 2 never be less than 0. Instead, use a long long
and 1 600851475143LL
.
Must be a limitation of dev-c++ support 1 for long long datatype. It compiles fine on MS VC++ 2010.
Source:
stackoverflow.com
More Related questions
Cookie Warning
We use cookies to improve the performance of the site. By staying on our site, you agree to the terms of use of cookies.