One option if you would like to use format strings with C++ I/O streams is to use Boost.Format.