Using Long Long s

Write here if you have problems with your C++ source code

Moderator: Board moderators

Post Reply
Navid
New poster
Posts: 4
Joined: Sun Nov 03, 2002 9:19 pm
Location: University of Tehran-Tehran-Iran
Contact:

Using Long Long s

Post 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?
Jordan Gordeev
New poster
Posts: 14
Joined: Tue Nov 12, 2002 6:04 pm
Location: Bulgaria

Post 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.
Post Reply

Return to “C++”