Re: [Dev-C++] Warning when compiling constant expression
Open Source C & C++ IDE for Windows
Brought to you by:
claplace
|
From: Michal M. <mol...@se...> - 2003-10-25 19:08:51
|
David McKen wrote: > const unsigned long prime_product = 3234846615; > //3234846615 is the result of the above calculation. > > Now I get this warning. > factor.cpp:12: warning: this decimal constant is unsigned only in ISO > C90 > > My code assumes a 32-bit system, which means an unsigned int is > capable of storing 2^32 (4,294,967,296) which is greater then the > number I am attempting to store in it? These are just warnings but I > still want to figure out why I am getting them. you could try: const unsigned long prime_product = 3234846615U; |