Correct printf format specifier for size_t: %zu or %Iu?

后端 未结 4 1628
不知归路
不知归路 2020-11-29 08:02

I want to print out the value of a size_t variable using printf in C++ using Microsoft Visual Studio 2010 (I want to use printf instea

4条回答
  •  南笙
    南笙 (楼主)
    2020-11-29 08:20

    Based on the answer from here, %z is a C99 addition. Since MSVC doesn't support any of the later C standards, it's no surprise that %z isn't supported.

提交回复
热议问题