In C99, one of the possible format specifiers is "%zi", which according to cppreference should correspond to a "signed size_t
". On Linux systems, I use ssize_t
from sys/types.h
and that works. But - on Windows, we don't have that. Plus - the fact that it has worked for me might just be a fluke.
How can I determine, for certain and in a portable way, the type I'm supposed to pass for "%zi" in a printf()
/sprintf()
call?