#include #include //for ostrstream; it includes iostream for you using namespace std; int main(int argc, char **argv) { const char word[] = "size"; const int i = 38; const char c = 'L'; ostrstream ost; ost << word << " " << i << c; if (!ost) { cerr << argv[0] << ": the ostrstream failed\n"; return EXIT_FAILURE; } cout << "The string contains \"" << ost.str() << "\".\n"; return EXIT_SUCCESS; }