0
我试图实现一个系统,它从账户中获得余额,并且减少给定的金额。这是我的方法。使用正确的操作数
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;
}
我问这我操作数我会把入行那会正确地减去“A”从“Temp.getbalance”
谢谢!当答案如此简单时,这很令人尴尬,我想这就是当你长时间盯着问题时会发生什么。 – ErrorOperator
大声笑 - 无后顾之忧,很高兴得到了协助! –