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
size_t
printf
The Microsoft documentation states:
The hh, j, z, and t length prefixes are not supported.
hh
j
z
t
And therefore %zu is not supported.
%zu
It also states that the correct prefix to use for size_t is I – so you'd use %Iu.
I
%Iu