Search code examples
c++cwindowsprintfunsigned

printf format for unsigned __int64 on Windows


I need to print a ULONGLONG value (unsigned __int64). What format should i use in printf ? I found %llu in another question but they say it is for linux only.

Thanks for your help.


Solution

  • Using Google to search for “Visual Studio printf unsigned __int64” produces this page as the first result, which says you can use the prefix I64, so the format specifier would be %I64u.