Another program problem on the rise. I need help please.
The code is:
#include<iostream>
#include<fstream>
using namespace std;
void hilo( int n, double & highest, double & lowest);
int main(){
char filename[100];
ifstream input;
double h, l;
do{
cout << "Enter name of input file: ";
cin >> filename;
input.open(filename);
if(!input.is_open()){
cout << "Failed to open " << filename << "\nTry again\n";
}
}while(!input.is_open());
hilo(h, l);
cout << "Highest: " << h << endl;
cout << "Lowest: " << l << endl;
return 0;
}
void hilo(int n, double& highest, double & lowest){
int number;
highest = lowest = number;
for (int i=1; i < n; i++){
cout << "Enter number: ";
cin >> number;
if (number > highest)
highest = number;
else if (number < lowest)
lowest = number;
}
}
I am receiving a C2660 error that says it can't take 2 arguments and I have no idea what it means.
Any help is appreciated.











