Next: The autosprintf
class, Previous: GNU autosprintf, Up: GNU autosprintf [Contents]
This package makes the C formatted output routines (fprintf
et al.)
usable in C++ programs, for use with the <string>
strings and the
<iostream>
streams.
It allows to write code like
cerr << autosprintf ("syntax error in %s:%d: %s", filename, line, errstring);
instead of
cerr << "syntax error in " << filename << ":" << line << ": " << errstring;
The benefits of the autosprintf syntax are:
cout << hex;
not followed by cout << dec;
).