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 に答える