Author: Vincent Diepeveen
Date: 07:36:58 06/07/04
Go up one level in this thread
On June 07, 2004 at 10:30:50, Fabien Letouzey wrote:
>>Like when I tried this,
>
>>void main()
>>{
>> typedef unsigned __int64 u64;
>> u64 r;
>> r=1<<36;
>> printf("%I64u",r);
>> getchar();
>>}
>
>>The r value was printed as 0.Also for other numbers >36 its printing as 0.Is
>>this correct value that r is having?
>
>Yes, you shift "1" which is a 32-bit integer (int).
>It should be r = 1ui64 << 36;
>I suppose "1i64u" or "(unsigned __int64) 1" also work.
>
>Fabien.
r = 1<<36; // works for good compilers not for the rest
This page took 0.02 seconds to execute
Last modified: Thu, 15 Apr 21 08:11:13 -0700
Current Computer Chess Club Forums at Talkchess. This site by Sean Mintz.