Size_t is defined as an unsigned integer, but the size of it depends on whether you're on a 32 or 64-bit machine. What's the correct and portable way to print out a size_t?
Size_t
unsigned
size_t
Try using the %zu format string
%zu
size_t val = get_the_value(); printf("%zu",val);
The z portion is a length specifier which says the argument will be size_t in length.
Source - http://en.wikipedia.org/wiki/Printf#printf_format_placeholders
1.4m articles
1.4m replys
5 comments
57.0k users