Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include<iostream>
- #include<queue>
- using namespace std;
- queue<int>Q;
- int main()
- {
- Q.push(10);
- Q.push(15);
- Q.push(8);
- Q.push(3);
- Q.pop(); // 10 delete হয়ে গিয়েছে ।
- cout<<Q.front()<<endl; // কিউ এর front value এখন 15 ।
- cout<<"\nPrinting remaining values of queue : \n\n";
- while(!Q.empty())
- {
- cout<<Q.front()<<endl;
- Q.pop();
- }
- // এখানে empty() ফাংশনটি কিউ খালি হয়েছে কিনা তা check করে ।
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment