我知道我的工作是草率的,這是我在這堂課中的第四個任務。任何幫助將不勝感激,謝謝。錯誤:無法在作業中將'double'轉換爲'double(double,double,double)'
double getPrincipal(0);
double getRate(0);
double getYears(0);
double computeAmount(double getPrincipal, double getRate, double getYears);
double displayAmount(double principal, double rate, double years, double amount);
cout << "what is the principal ammount?" << endl;
cin >> getPrincipal;
cout << "What is the percentage rate?" << endl;
cin >> getRate;
cout << "Over how many years will the money stay in the bank?" << endl;
cin >> getYears;
computeAmount = pow((1 + getRate/100),getYears); // This is where i got the error
您的意思是聲明在此代碼塊/使用lambda函數? –