hello

ive been working on this project for the past couple of days, and i keep on getting the same error. it tells me that the term will not evaluate a function with two arguments. please help me! thanks

#include <iostream>
#include <cmath>
using namespace std;
int main ()

{

	double num1, num2, num3, pow, total;

	cout << "Loan Amount: ";
	cin >> num1;
	cout << "Monthly Interest Rate: ";
	cin >> num2;
	cout << "Number of Payments: ";
	cin >> num3;
	cout << "Monthly Payments: ";
	cin >> num2 * pow(1.0 + num2, num3) / (pow(1.0 + num2, num3) - 1) * num1;
	
	return 0;

}

Don't you mean cout? :)

However, after closer investigation, the error with pow() actually has to do with the fact that pow is only available in the following forms:

float std::pow(float, float)
long double std::pow(long double, long double)
double std::pow(double, int)
float std::pow(float, int)
long double std::pow(long double, int)

Take your pick.

You have a variable "pow" which is masking the function pow( ).

You don't use that variable, so remove it.

Also, in your red line, why are you doing cin >> num2 * ...... ? Don't you really want to be doing output?

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.