Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- int Associacao::total(int k, int total){
- if(k<=l.comprimento()){
- Donativo* aux;
- l.encontra(k,aux);
- if((typeid(*aux)==typeid(Dinheiro)){
- total=total+(dynamic_cast<Dinheiro *>(aux)->getQuantia());
- }else if((typeid(*aux)==typeid(Cheque)){
- total=total+(dynamic_cast<Dinheiro *>(aux)->getMontante());
- }
- total=total(k+1,total);
- }
- return total;
- }
Add Comment
Please, Sign In to add comment