错误 C2064.我已经尝试了我能想到的一切,但没有获胜
Error C2064. I have tried everything I can think of to no prevail
>错误 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
是一个变量,而不是一个函数。更有趣的是你期望这段代码做什么。
相关文章:
- C++我的数学有什么问题,为什么我的代码不能正确循环
- 你能重载对象变量名本身返回的内容吗
- 有人能分解一下这个c++模板的语法吗
- 为什么在没有显式默认构造函数的情况下,将另一个结构封装在联合中作为成员的结构不能编译
- 试试完美的正方形,你能给点小费吗
- 为什么我的for循环不能正确获取argv
- 不能在初始值设定项列表中将非常量表达式从类型 'int' 缩小到'unsigned long long'
- 为什么我不能在 FOR LOOP 中使用 i/10,C++?
- 为什么我不能在不创建字符串变量的情况下使用函数的字符串输出
- 将指针设置为"nullptr"并不能防止双重删除?
- 为什么模板类中的对象不能返回值
- 为什么我不能在一个类的不同行中声明和定义成员变量?
- 为什么我不能在 C++ 中的特定函数重载中调用同一函数的任何其他重载?
- ld:bind_at_load和-bitcode_bundle(Xcode设置ENABLE_bitcode=YES)不能
- 数组长度,为什么从命令行获取时不能使用它?
- Windows/Cygwin - 不能使用 pybind11 - 犯错误
- 为什么我不能使用 EGL 创建无头 OpenGl 上下文?
- 为什么与常规GCC不同,即使有"学究性错误",MinGW-GCC也能容忍丢失的返回类型
- 谁能想到一种方法,我可以错误地检查此问题
- 错误 C2064.我已经尝试了我能想到的一切,但没有获胜