RES: [Dev-C++] Can I handle 64 bits with unsigned long long int ?
Open Source C & C++ IDE for Windows
Brought to you by:
claplace
|
From: Daniel K. O. <dan...@ya...> - 2003-04-06 14:10:37
|
> I checked and saw that MINGW's long long types are 64-bit. You made a
> mistake in the format specifier of printf(). Thus an example code of
> printf() printing an unsigned long long value is:
>
> #include <stdio.h>
> #include <limits.h>
>
>
> int main(void)
> {
> printf ("Maximum value of unsigned long long: %llu\n", ULLONG_MAX);
>
> getchar();
> }
MinGW uses MSVCRT.DLL; the printf doesn't know what is this %llu, and
there's nothing you can do about it. More details here:
http://sourceforge.net/tracker/index.php?func=detail&aid=661165&group_id=243
5&atid=102435
Use "%I64u" for now.
Daniel K. O.
|