Author: Fabien Letouzey
Date: 07:30:50 06/07/04
Go up one level in this thread
>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.
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.