#include <iostream>
#include <iomanip>
#include <cmath>
usingnamespace std;
double round(double num1, int num)
{
int i = int pow(10,num);
double a = num1 * i;
double b = a + 0.5;
double c = floor(b);
return (c/i);
}
int main()
{
double r;
int n;
double rounded;
cout << "(c) 2012, bfields Byron Fields." << endl;
cout << "Please enter a double number to be rounded: " << endl;
cin >> r;
cout << "Please enter an integer number to specify the decimal places: " << endl;
cin >> n;
rounded = round(r,n);
cout << "The number " << r << "rounded to " << n << "decimal places is : " << rounded << endl;
return 0;
}
Read the error list. Hey look, a list of function. Which one of those are you trying to call? Well, which one takes two int parameters? None of them. Maybe you should only call functions that exist.