RE: [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: Ioannis V. <iv...@at...> - 2003-04-06 16:39:38
|
> -----Original Message-----
> From: dev...@li...
> [mailto:dev...@li...] On Behalf
> Of Daniel K. O.
> Sent: Sunday, April 06, 2003 5:11 PM
> To: 'Dev-C++ -Users-List'
> Subject: RES: [Dev-C++] Can I handle 64 bits with unsigned
> long long int ?
>
>
>
>
> > 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.
Of course it does. In fact I compiled that code with:
C:\c>gcc temp.c -o temp
C:\c>temp
Maximum value of unsigned long long: 4294967295
C:\c>
Ioannis Vranos
* Programming pages: http://www.noicys.freeurl.com
* Alternative URL: http://run.to/noicys
Anti-racism movement: http://www.positive-youthfoundation.org
Iraq Peace Pledge: http://www.peacepledge.org
|