错误 C2064.我已经尝试了我能想到的一切,但没有获胜

Error C2064. I have tried everything I can think of to no prevail

本文关键字:获胜 能想到 C2064 错误      更新时间:2023-10-16

>错误 C2064:术语的计算结果不是采用 1 个参数的函数

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

// 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), andnk (the amount of payments that have been made).nn";
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;
}
double R,L_prime,i;
//....
L_prime=R((1-(pow((1+i),(-m*t))))/i);

让我们进一步修剪它:

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

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