3 ms·
The cheap jabs are all incorrect, as well. Any compiler from the last 10 years will warn you if you don't match your printf format string to the arguments. pr
by reality_czech 9y ago
The cheap jabs are all incorrect, as well. Any compiler from the last 10 years will warn you if you don't match your printf format string to the arguments. printf also supports reordering arguments using the %m$ syntax (read the man page). And yes, you can extend printf with your own types.
A better guide to using strings in C++ is here: https://yosefk.com/c++fqa/io.html https://yosefk.com/c++fqa/io.html
- nikbackm 9y agoDoes the compiler also warn when you don't use a literal format string?