Good point. :laugh:
T
tomatopipps
@tomatopipps
Posts
-
Why does printf_s exist? -
Why does printf_s exist?According to MSDN[^], "The main difference between
printf_s
andprintf
is thatprintf_s
checks the format string for valid formatting characters, whereasprintf
only checks if the format string is a null pointer." So, basically, if I understand correctly, it's not really a security feature as its name implies, it's a debug feature. The whole "uncontrolled format string" problem it's supposed to solve could be avoided by basic knowledge of whatprintf
actually does. EDIT: I don't even know why I'm not just usingcout