Page 1 of 1

Using Long Long s

Posted: Thu Nov 14, 2002 7:30 pm
by Navid
in past topics ,it had talked about using "Unsigned Long Long" Data type for GCC
but when i write
unsigned long long ull = 0xffffffffffffffff; // 18446744073709551615
//a 64 bit value

it arises a compiler error : Integer Constant Out of range

should I set something at my code or for compiler?

Posted: Sun Nov 17, 2002 2:02 pm
by Jordan Gordeev
I have extracted this from the manual for you:
To make an integer constant of type `long long int', add the suffix `LL' to the integer. To make an integer constant of type `unsigned long long int', add the suffix `ULL' to the integer.