Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <bits/stdc++.h>
- #include <queue>
- using namespace std;
- int main()
- {
- queue<string> ins;
- string str;
- getline(cin, str);
- char *token = strtok(&str[0], " ");
- while (token != NULL)
- {
- token = strtok(NULL, " ");
- ins.push(token);
- }
- while(!ins.empty()) {
- cout << "Popping ";
- cout << ins.front() << "\n";
- ins.pop();
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement