How to print unsigned __int64 using printf

C, C++, Visual C++, C++.Net Topics
Post Reply
Jane
Corporal
Corporal
Posts: 10
Joined: Sun Jul 19, 2009 9:19 pm

How to print unsigned __int64 using printf

Post by Jane » Wed Jul 22, 2009 8:54 pm

Hi all,

Is there any way to display __int64 using the printf command?
(I couldn't find any from the MS site)

Jane
User avatar
Neo
Site Admin
Site Admin
Posts: 2642
Joined: Wed Jul 15, 2009 2:07 am
Location: Colombo

Re: How to print unsigned __int64 using printf

Post by Neo » Wed Jul 22, 2009 9:00 pm

The following code will do the thing on MS VC 6.0.

Code: Select all

printf("value using I64d: %I64d\n", value);
printf("value using I64x: %016I64x(hex)\n", value);
Hope this will help.

Neo
Post Reply

Return to “C/C++ Programming”