How do you specify a 64 bit unsigned int const 0x8000000000000000 in VS2008?
        Posted  
        
            by Mark Franjione
        on Stack Overflow
        
        See other posts from Stack Overflow
        
            or by Mark Franjione
        
        
        
        Published on 2010-05-14T16:17:33Z
        Indexed on 
            2010/05/14
            16:24 UTC
        
        
        Read the original article
        Hit count: 205
        
I read about the Microsoft specific suffix "i64" for integer constants.  I want to do an UNsigned shift to a ULONGLONG.
ULONGLONG bigNum64 = 0x800000000000000i64 >> myval;
In normal C, I would use the suffix "U", e.g. the similar 32 bit operation would be
ULONG bigNum32 = 0x80000000U >> myval;
I do NOT want the 2's complement sign extension to propogate through the high bits. I want an UNSIGNED shift on a 64 bit const number. I think my first statement is going to do a SIGNED shift right.
I tried 0x800000000000000i64U and 0x800000000000000u64 but got compiler errors.
© Stack Overflow or respective owner