Replacement for CString::Format in standard C++

std::stringstream can be used as a replacement for CString::Format, if you are using CString just for the sake of Format, caveat being that it could be slow, I’ve heard a user mentioning this but not sure, I haven’t tested it out, but should be definitely better that using CString::Format and then assigning to std::string.

[sourcecode language=’cpp’]std::stringstream strm;
strm << "Age: " << nAge << ", DOB: " << szDate << ", Salary: " << nSalary; std::cout << strm.str();[/sourcecode]

Appreciate your comments...