0

错误 C2064:术语不计算为采用 1 个参数的函数

我试图检查几乎所有内容,包括 double 和 int 定义,但我不断收到此错误。我检查了有关此错误的其他问题,但我找不到任何东西。如果你们能帮助我,那就太好了。

// Bonus.cpp : main project file.

#include "stdafx.h"
#include <iostream>
#include <cmath>

using namespace System;
using namespace std;

double Per_Pay(double L, double r, double m, double t);
double After_Pay(double L, double r, double m, double t, double k);

int main()
{
int L,m,t,k;
double r;
cout << "Please input the values of L (the loan amount), r (the doubleerest rate per     year),\nm (the number of paymenst in a year), t (how many years the loan is for), and\nk (the amount of payments that have been made).\n\n";
cin >> L >> r >> m >> t >> k;
cout << "The amount to be payed each time is $" << Per_Pay(L,r,m,t) << " and the amount to be payed after " << k << " amount of payments is $" << After_Pay(L,r,m,t,k) << endl;
return 0;
}

double Per_Pay(int L, double r, int m, int t)
{
double R,i;
i=(r/m);
R=(L*i)/(1-(pow((1+i),(-m*t))));
return R;
}

double After_Pay(int L, double r, int m, int t, int k)
{
double R,L_prime,i;
i=(r/m);
R=(L*i)/(1-(pow((1+i),(-m*t))));
L_prime=R((1-(pow((1+i),(-m*t))))/i);
return L_prime;
}
4

1 回答 1

1
double R,L_prime,i;
//....
L_prime=R((1-(pow((1+i),(-m*t))))/i);

让我们进一步修剪它:

double R, L_prime;
L_prime=R(whatever);

问题相当明显。R是变量,不是函数。更有趣的是你期望这段代码做什么。

于 2013-01-22T20:21:54.230 回答