记录详情

Compile Error

/in/foo.cc: In member function 'virtual bool CheckingAccount::debit(double)':
/in/foo.cc:116:7: warning: this 'if' clause does not guard... [-Wmisleading-indentation]
  else if (b > balance)
       ^~
/in/foo.cc:118:3: note: ...this statement, but the latter is misleadingly indented as if it is guarded by the 'if'
   return false;
   ^~~~~~
/in/foo.cc: In function 'int main()':
/in/foo.cc:154:36: error: invalid use of non-static member function 'double Account::getBalance()'
   cout << fixed << setprecision(3) << ptr[i]->getBalance<<endl;
   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~
/in/foo.cc:13:9: note: declared here
  double getBalance() { return balance; }
         ^~~~~~~~~~

信息

递交者
类型
递交
题目
P1009 12.14 Polymorphic Banking Program Using Account Hierarchy
语言
C++
递交时间
2020-03-27 23:25:29
评测时间
2020-03-27 23:25:29
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes