如何使用C++ String Streams追加int?

Gol*_*les 14 c++ string stringstream

任何人都可以告诉我或指向一个简单的例子,说明如何将int附加到包含单词"Something"(或任何单词)的字符串流中?

Dan*_*ite 19

stringstream ss;
ss << "Something" << 42;
Run Code Online (Sandbox Code Playgroud)

为了将来参考,请检查一下.

http://www.cplusplus.com/reference/iostream/stringstream/