Clean code to printf size_t in C++ (or: Nearest equivalent of C99’s %z in C++) January 3, 2023 by Tarik The printf format specifier %zu will work fine on C++ systems; there is no need to make it more complicated.