Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include<bits/stdc++.h>
- using namespace std;
- int main() {
- string str = "1 2 3 4 5";
- string token;
- stringstream s;
- s << str;
- // s >> token;
- while(getline(s, token, ' ')) {
- cout << token << endl;
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement