Hi there im really new to C++ and im supposed to be doing a maturity calculator and i keep getting error code c2661 no overload function takes 1 arguments.

Please look over my code and let me know everything that i have screwed up on because im sure there is a lot :)

`````` Program for calculating maturity value of a loan.
*/
#include "stdafx.h"
#include <iostream>
#include <math.h>

int _tmain(int argc, _TCHAR* argv[])
{using std::cout;
using std::endl;
using std::cin;
/*
D = Investment Amount
P = Interest
Y = Number of Years
M = Conversions/Year
S = Maturity Value

Formula for maturity is S = D ( 1 + P/M) to the power of YM
*/
double I,Y,M;
float S,D;
int result;

I=2;
Y=3;
M=4;
D=6;

cout<<"Please enter the total investment amount: ";

cin>>D;

cin>>I;

cin>>Y;

cout<<endl<<"Please enter the number of conversions per year on your investment: ";

cin>>M;

S=pow(M/I)(M*Y); // THIS IS WHERE IM GETTING MY ERROR MESSAGE FROM.

cout<<endl<<"Your total amount of maturity is: ";

S=result+1*D;

cout<<result;

return 0;
}
``````

You have a couple of problems in your code.

You should call the pow() like this

``S=pow(M/I, M*Y);``

result is used uninitialized here

``S = result + 1 * D;``
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.