形式参数表不匹配:无法解决函数过载

mismatch in formal parameter list: unable to resolve function overload

本文关键字:解决 函数 参数 不匹配      更新时间:2023-10-16

写我的第一个程序!任何关于上述错误的提示将不胜感激!!:)
我得到不匹配的形式参数列表,无法解决函数过载。

many many thanks,

#include <iostream>
#include <cmath>
#include "COMPFUN.H"
using namespace std;
int main()

{
    double futureValue = 0.0;
    double presentValue = 0.0;
    double interestRate = 0.0;

    cout << "Please enter Present Value: ";
    cin >> presentValue;
    cout << "Please enter rate: ";
    cin >> interestRate;

futureValue = ( presentValue * 1 + interestRate / 1200.0 , 36) << endl;
    cout << "Future value is: " << futureValue << endl;
    system("pause");
    return 0;
}

你期望什么

futureValue = ( presentValue * 1 + interestRate / 1200.0 , 36) << endl;

endl在这行末尾做什么?你想把结果移动endl位吗?您是否希望n附加到futureValue并在之后冲洗它?