Okay I have a c++ program due tomorrow and I am stuck with a part of it and I have tried many different ways of doing it but nothing seems to work. Any help would be greatly appreciated.
well idea of the program is to transfer information from an input file which I named grades.txt to an output file which is called grades2.txt. The information in the grades.txt file contains a last name then first name then right beside it 10 grades. I'll give you and example:
Dunn Larry 100 85 75 68 90 80 75 89 80 100
Watts Sue 100 89 90 76 89 90 87 78 80 100
and it keeps on going like that.
My output file is suppose to have all the information from the grades.txt file plus the average at the end of each persons grade.
My problem is that I am not able to get all the variable,the average at the end of each persons grade, and the spacings correct.
I will post my c++ code to show what I am and to see if anybody can correct what I'm doing wrong.
using namespace std;
void grade_calc (ifstream& fin, ofstream& fout);
cout<<"Input file failed to open.\n";
cout<<"Output file failed to open.\n";
void grade_calc (ifstream& fin, ofstream& fout)
char symbol, symbol2;
double next,average, sum=0;