fork download
  1. #include <iostream>
  2. #include <sstream>
  3. #include <string>
  4.  
  5. using namespace std;
  6.  
  7. int main() {
  8. stringstream ss;
  9. string hello("hello");
  10. int world = 1234;
  11. ss << hello << world << endl;
  12. string res = ss.str();
  13. cout << res << endl;
  14. return 0;
  15. }
Success #stdin #stdout 0.02s 2860KB
stdin
Standard input is empty
stdout
hello1234