Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- void Caixa:: ordenafila(Cliente &cl){
- if(!c.vazia()){ //c é a Queue<Cliente*>
- if(typeid(cl)!=typeid(Prestacao)){
- if(typeid(c.ultimo)!=typeid(Pronto)){
- boolean flag=false;
- int cmp=c.comprimento();
- Cliente *aux;
- while(!flag){
- c.retira(aux);
- if(typeid(aux)==typeid(Prestacao)){
- c.insere(cl);
- flag=true;
- }
- c.insere(aux);
- cmp--;
- }
- for(int i=0;i<cmp;i++){
- c.retira(aux);
- c.insere(aux);
- }
- }else
- c.insere(cl);
- }else
- c.insere(cl);
- }else
- c.insere(cl);
- }
Advertisement
Add Comment
Please, Sign In to add comment