Re: A "unsigned long long " problem

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> i don't know why i cannot get 1<<63 in my c program.

Are your int data types 64-bits long?

The "1" in your "1<<63" is an int, not an unsigned long long.

If not, try this:

unsigned long long a = 1;
a <<= 63;

Or try this:

a = 1ULL << 63;

Either should work.

--Eljay


[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux