15 # include <vcl_msvc_warnings.h> 17 #undef vsprintf // this works around a bug in libintl.h 25 std::vsprintf(s, fmt, ap);
26 if (std::strlen(s) >=
sizeof s)
27 std::cerr << __FILE__
": WARNING! Possible memory corruption after call to vsprintf()\n";
28 std::string::operator=(s);
35 return os << (
char const*)s;
44 std::string fmt(
"foobar%d\n");
std::ostream & operator<<(std::ostream &os, const vul_sprintf &s)
vul_sprintf(char const *fmt,...)
C++ conforming replacement to the ANSI C functions sprintf and printf.
creates a formatted ANSI C++ string