Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include<bits/stdc++.h>
- using namespace std;
- int main(){
- queue<int>q;
- q.push(5); //5
- q.push(2); //5,2
- q.push(7); //5,2,7
- cout<<"front element in queue is : "<<q.front()<<endl; //5
- q.pop();
- //queue now : 2,7
- cout<<"front element in queue is : "<<q.front()<<endl; //2
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement