Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include "Konto.h"
- #include <vector>
- void przelew(std::vector<Konto> &konta, std::vector <Transakcja> &transakcje)
- {
- for (auto itr = transakcje.begin(); itr != transakcje.end(); itr++)
- {
- for (auto it = konta.begin(); it != konta.end(); it++)
- {
- if (itr->numerUznanego == it->numerKonta)
- {
- it->stanKonta += itr->kwota;
- }
- }
- }
- for (auto itr = transakcje.begin(); itr != transakcje.end(); itr++)
- {
- for (auto it = konta.begin(); it != konta.end(); it++)
- {
- if (itr->numerObciazonego == it->numerKonta)
- {
- it->stanKonta -= itr->kwota;
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement