Don't like ads? PRO users don't see any ads ;-)
Guest

Untitled

By: a guest on Jun 2nd, 2012  |  syntax: None  |  size: 0.37 KB  |  hits: 12  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. ArvBinPesq<Loja>arvloja;
  2.  
  3. void RedeDistribuicao::mostraLojasDecrescente()
  4. {
  5.         int tam=edf.comprimento();
  6.        
  7.         for(int i=1;i<tam+1;i++)
  8.         {
  9.                         Edificio *e;   
  10.                         Loja *l;
  11.                         listaLoja.encontra(i,l);
  12.                         edf.encontra(i,e);
  13.  
  14.        
  15.                 if(typeid(*e)==typeid(Loja))
  16.                 {
  17.                         l=dynamic_cast<Loja*>(e);
  18.                         arvloja.juntarno(*l);
  19.                        
  20.                 }
  21.  
  22.  
  23.         }
  24.         arvloja.Decrescente();
  25.        
  26.        
  27. }