我正在尝试实现一个从帐户中获取余额并减去给定金额的系统。这是我的方法。
transaction withdraw(double amount, double ID){
Account Temp(NULL,NULL,NULL,NULL,NULL);
Temp = Llist.search(ID); //Returns an Account Objet
Temp.setBalance(Temp.getBalance - amount); //Here is the error, '-' illegal, left operand has type 'double (_thisCall Account::* )(void)'
string t = "Withdraw";
transaction trans(t, amount, ID, name);
return trans;
}
我在问我将哪个操作数放入从“Temp.getbalance”中正确减去“a”的行中