#include <iostream> #include <string> #include <queue> using namespace std; class gammal{ private: -string name; -int dd,mm,yy; public: -gammal(string s, int d, int m, int y){ --name = s; --dd = d; --mm = m; --yy = y; -} -bool check(int d, int m, int y){ --if( d == dd && m==mm && y==yy+1) ---return true; --return false; -} -string get_name(){ --return name; -} }; int main() { -queue<gammal> g; -g.push(gammal("Ahmed",1,1,2019)); -g.push(gammal("Aly",2,1,2019)); -g.push(gammal("Omar",2,1,2019)); -g.push(gammal("John",3,1,2019)); -g.push(gammal("Magdy",4,1,2019)); -while(!g.empty()){ --int d,m,y; --cout<<"Enter Date: "; --cin>>d>>m>>y; --another: --if(g.front().check(d, m, y)){ ---cout<<"deleting "<<g.front().get_name()<<endl; ---g.pop(); ---goto another; --} -} -cout<<"No more members"<<endl; }