C2660, does not take 0 arguments
I have read about this error message and understand that there is something that I should put between the () of the calcAvg(), but I can't figure out what! I thought it would be 'number', but that doesn't work... PLEASE HELP!
I bold-ed the calcAvg function
//Ch9Ex3and4.cpp - accepts an four integers, calculate the average and returns the result. Also includes exercise 4 by listing the function prototype for the calcAverage function.
//Created/revised by Rebekah Sapp on 10/21/07
#include <iostream>
#include <iomanip>
using std::cout;
using std::cin;
using std::endl;
using std::setprecision;
using std::ios;
using std::setiosflags;
//function prototype
double getInput();
double calcAvg(double, double, double, double);
int main()
{
//declare variables
double number = 0.0;
double div = 0.0;
double calcAv = 0.0;
//enter input item
number = getInput();
calcAv = calcAvg();
//display output item
cout << setiosflags(ios::fixed) << setprecision(0);
cout << "The average =: " << calcAvg << endl;
return 0;
} //end of main function
//*********function definitions**********
double getInput()
{
double inputNum1 = 0.0;
double inputNum2 = 0.0;
double inputNum3 = 0.0;
double inputNum4 = 0.0;
cout << "Enter first number to calculate average: ";
cin >> inputNum1;
cout << "Enter second number to calculate average: ";
cin >> inputNum2;
cout << "Enter third number to calculate average: ";
cin >> inputNum3;
cout << "Enter fourth number to calculate average: ";
cin >> inputNum4;
return inputNum1;
return inputNum2;
return inputNum3;
return inputNum4;
} //end of getInput function
double calcAvg(double in1, double in2, double in3, double in4)
{
double div = 0.0;
double calcAv = 0.0;
calcAv = (in1 + in2 + in3 + in4)/div;
return calcAv;
} //end of calcAvg function