我知道我的工作是草率的,这是我在这堂课中的第四个任务。任何帮助将不胜感激,谢谢。错误:无法在作业中将'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函数? –