fork download
  1. #include <iostream>
  2. #include <string>
  3. #include <sstream>
  4. #include <iomanip>
  5.  
  6. using namespace std;
  7.  
  8. int main()
  9. {
  10. stringstream foo("Hallo Welt");
  11. string wort1, wort2, wort3;
  12. foo >> noskipws >> wort1 >> wort2 >> wort3;
  13. cout << wort1 << wort2 << wort3 << '\n';
  14. }
  15.  
Success #stdin #stdout 0.02s 2860KB
stdin
Standard input is empty
stdout
Hallo