Advertisement
Guest User

Untitled

a guest
Jan 21st, 2019
60
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.60 KB | None | 0 0
  1. #include "Konto.h"
  2. #include <vector>
  3.  
  4. void przelew(std::vector<Konto> &konta, std::vector <Transakcja> &transakcje)
  5. {
  6.  
  7. for (auto itr = transakcje.begin(); itr != transakcje.end(); itr++)
  8. {
  9. for (auto it = konta.begin(); it != konta.end(); it++)
  10. {
  11.  
  12. if (itr->numerUznanego == it->numerKonta)
  13. {
  14. it->stanKonta += itr->kwota;
  15. }
  16. }
  17. }
  18. for (auto itr = transakcje.begin(); itr != transakcje.end(); itr++)
  19. {
  20. for (auto it = konta.begin(); it != konta.end(); it++)
  21. {
  22. if (itr->numerObciazonego == it->numerKonta)
  23. {
  24. it->stanKonta -= itr->kwota;
  25. }
  26.  
  27. }
  28. }
  29.  
  30. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement