B
Bob Altman
Hi all,
Why doesn't the following unmanaged C++ code work as expected:
string s;
ostringstream strm(s); // This stream should store results in s
strm << 25;
cout << s << endl; // s still contains an empty string
cout << strm.str(); // but the stream internally contains "25"
Why doesn't the following unmanaged C++ code work as expected:
string s;
ostringstream strm(s); // This stream should store results in s
strm << 25;
cout << s << endl; // s still contains an empty string
cout << strm.str(); // but the stream internally contains "25"