Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

__int64 and printf/scanf

0 views
Skip to first unread message

Ping

unread,
Sep 27, 2001, 3:52:12 PM9/27/01
to
Can one use __int64 native 64-bit integers with printf and scanf? On
Solaris I believe that, for example, %llx can be used. Is there an
equivalent for Visual C/C++ Win32 applications?

Thanks.


Ping

unread,
Sep 27, 2001, 3:56:44 PM9/27/01
to
"Ping" <pi...@ping.com> wrote in message
news:3bb38365$0$8514$ed9e...@reading.news.pipex.net...

Aagh. I think I've just found it: %I64d, %I64x and so on.


James Brown

unread,
Sep 27, 2001, 3:59:24 PM9/27/01
to
Yes: use the %I64 format specifier. Look under
MSDN for more details

e.g. sprintf(buf, "%I64", 2932039)
sprintf(buf, "%I64u", 23)
sprintf(buf, "%I64x", 34)
etc

James.

--
www.catch22.uk.net
Free win32 software, sourcecode, and tutorials
------
Please remove "NOSPAM" when replying.


"Ping" <pi...@ping.com> wrote in message
news:3bb38365$0$8514$ed9e...@reading.news.pipex.net...

Ping

unread,
Sep 27, 2001, 4:28:36 PM9/27/01
to
"James Brown" <NOSPAMjam...@virgin.net> wrote in message
news:YuLs7.3850$3Q5.6...@news2-win.server.ntlworld.com...

> Yes: use the %I64 format specifier.
> James.

>
> "Ping" <pi...@ping.com> wrote in message
> > Can one use __int64 native 64-bit integers with printf and scanf?
>

Thanks James.


0 new messages