>>pers[i].haemta_betalat() = pers[i].haemta_betalat() + pny.haemta_betalat();
haemta_betalat() is a function call, you can not add anything to its return value. What you want is this:
pers[i].betalat_andras = pers[i].betalat_andras + pny.haemta_betalat();
But that might give you an error too since betalat_andras is a private member of the class. You could fix that too by writing a add function pers[i].add_betalat() = pers[i].haemta_betalat() + pny.haemta_betalat();
where add_betalat() is declare as this:
public:
void add_betalat(double n) { betalat_andras += n;}
Ancient Dragon
Retired & Loving It
30,049 posts since Aug 2005
Reputation Points: 5,662
Solved Threads: 2,343