fork(1) download
  1. #include <iostream>
  2. #include <sstream>
  3. #include <string>
  4. using namespace std;
  5.  
  6. int main()
  7. {
  8. stringstream ss(" Hello, World");
  9. string str;
  10. ss >> noskipws >> str;
  11. cout << "Value of str: " << str;
  12. }
Success #stdin #stdout 0s 3428KB
stdin
Standard input is empty
stdout
Value of str: