Use the initialization list as follows: (Best Approach)
class Rachunek{ public: Osoba& wlasciciel; double stan_konta; Rachunek(Osoba* wlasciciel, double stan_konta): wlasciciel(*wlasciciel) , stan_konta(stan_konta) {
You have the link as a member, and the link should be initialized immediately. This notation allows you to initialize the time of the announcement. If you used a regular member without & , it would work just fine, as you did. Although the style presented here is more effective.
Alternative: (Less effective approach)
class Rachunek{ public: Osoba wlasciciel;
source share