This is the mail archive of the gcc-help@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Problems with using identifier long long int in gcc++


Hi Maxim,

You need to explicitly make the constant an unsigned long long.

You do not get implicit conversion from a constant to a unsigned long long.
Why?  Well, because unsigned long long is not in the standard, it's an
extension.

So try this:

l1: unsigned long long a;
l2: cout << sizeof(a) << endl;
l3: a = 1281474976710655ULL;
l4: cout << a << endl;

HTH,
--Eljay


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]