Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <queue>
- using namespace std;
- void memoryInfo(queue <double> queueMem)
- {
- cout << "Rozmiar kolejki FIFO: "
- << queueMem.size()
- << ", w bajtach: "
- << queueMem.size() * sizeof(string)
- << endl;
- }
- int main()
- {
- queue <string> kolejka;
- kolejka.push("pomoc mamie");
- kolejka.push("zrobic lekcje");
- kolejka.push("wnieść śmieci");
- cout<<"1. usuwanie \n";
- cout<<"2. dodawanie \n";
- cout<<"3. koniec \n";
- int kolejnosc;
- do{
- cin>>kolejnosc;
- switch(kolejnosc)
- {
- {
- case 1:
- {
- string first = kolejka.front();
- cout << "Zrobione: " << first << endl;
- kolejka.pop();
- }
- break;
- case 2:
- {
- }
- break;
- case 3:{
- break;
- }
- return 1;
- break;
- }
- }
- }while (kolejnosc!=3);
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement