Advertisement
rotti321

stringstream

Nov 23rd, 2021
717
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #include <bits/stdc++.h>
  2.  
  3. using namespace std;
  4.  
  5. int main() {
  6.     string s;
  7.     getline(cin,s);
  8.     stringstream v(s);
  9.     while(getline(v,s,' '))
  10.     {
  11.         cout<<s<<endl;
  12.     }
  13.     return 0;
  14. }
Advertisement
RAW Paste Data Copied
Advertisement