integer constant is too large for “long” type [duplicate]
问题 This question already has answers here : Closed 8 years ago . Possible Duplicate: long long in C/C++ Writing a simple program for a project Euler problem. Refuses to compile because "integer constant is too large for "long" type" , even though it should be well within the size limits of an unsigned long long . Using the dev-c++ compiler. code in question: #include <iostream> bool isprime (unsigned long long i) { if(i==1||i==0) return false; if(i==2) return true; for(unsigned long long k=2;k!