fork(1) download
  1. #include <iostream>
  2. #include <string>
  3. #include <sstream>
  4. using namespace std;
  5. int main() {
  6. string sentence{"Hello how are you."};
  7. stringstream ss{sentence};
  8. string junkWord;
  9. ss >> junkWord;//to get rid of first word
  10. //cout<<sentence.substr(junkWord.length()+1);
  11. cout<<ss.str();
  12. }
  13.  
Success #stdin #stdout 0s 3472KB
stdin
Standard input is empty
stdout
Hello how are you.