Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <queue>
- using namespace std;
- int main()
- {
- queue<int> q;
- q.push(10);
- q.push(5);
- cout << "Front element: " << q.front() << endl;
- cout << "Back element: " << q.back() << endl;
- q.pop();
- cout << "Front element after pop: " << q.front() << endl;
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment