I recently saw this 1UI64 type. I didnt get what kind of type is it. How can they use 1 before ?
Asked
Active
Viewed 1,577 times
4 Answers
5
In Microsoft C/C++ The I64
part of the expression is a suffix for integer constants that indicates the constant should be a 64-bit type:
This is a Microsoft extension, even though the docs don't call that out.
A somewhat more portable way to specify such a constant might be to include <stdint.h>
and use UINT64_C(1)
- MSVC has stdint.h
as of VS2010.
For versions prior to that you might consider the options provided in this SO question: C99 stdint.h header and MS Visual Studio

Community
- 1
- 1

Michael Burr
- 333,147
- 50
- 533
- 760
-
1you could also mention the C99 version `UINT64_C(1)` from `stdint.h` – Christoph Nov 23 '10 at 10:46
-
@Christoph: Done. I had a mention about `UINT64_C()` in my answer at first, but decided to leave it out since MSVC complicates the `stdint.h` situation a little. But since you suggested it, I added it back with a bit of detail. – Michael Burr Nov 24 '10 at 03:11