I get this error: variable or field 'calc_score' declared void
and I am pretty much stuck. Here is my code, it obviously isn't finished but I need to be able to get this void to compile to continue on.
#include <fstream>
#include <iostream>
#include <cstdlib>
#include <iomanip>
using namespace std;
void calc_score(ifstream& fin, ofstream& fout);
int main()
{
char in_file_name[21], out_file_name[21];
ifstream fin;
ofstream fout;
cout<< "This program calculates the average of a list of grades.\n"
<< "Enter the input file name (maximum of 20 characters):\n";
cin>> in_file_name;
cout<< "Enter the output file name (maximum of 20 chracters):\n";
cin>> out_file_name;
cout<< "The numbers for the grades will be read from the file "
<< in_file_name << "and\n"
<< "placed into the file "
<< out_file_name << "with the average of each grade set.\n";
fin.open(in_file_name);
if(fin.fail( ))
{
cout<< "Input file opening failed!\n";
exit(1);
}
fout.open(out_file_name);
if(fout.fail( ))
{
cout<< "Output file opening failed!\n";
exit(1);
}
void calc_score(fin, fout);
fin.close( );
fout.close( );
return 0;
}
void calc_score(ifstream& fin, ofstream& fout)
{
}