Can someone please copy/paste the following source and look at the error message? I am receiving too few arguements to function error.
Please help!
//preprocessor directive
#include<iostream>
#include<fstream>
#include<iomanip>
using namespace std;
//global variables/constants, function prototypes
void headerfn(); // void fn without parameters
void namefn(string fname, string lname); // void fn with parameters
void inputfn(int prog1, int prog2, int prog3, int test1, int test2, int test3);
void resultsfn(int &totalpts, float &progavg, float &testavg, float &courseavg, char &grade, int prog1, int prog2, int prog3, int test1, int test2, int test3);
void outputfn(string fname, string lname, int &totalpts, float &progavg, float &testavg, float &courseavg, char &grade);
int main(){
system("color f0");
headerfn(); // functional call
string fname, lname; //declaring variables
namefn(fname, lname); //function call
int prog1, prog2, prog3, test1, test2, test3; // declaring variables
inputfn(prog1, prog2, prog3, test1, test2, test3); // function call
float progavg, testavg, courseavg; // declaring variables
int totalpts;
char grade;
resultsfn(totalpts, progavg, testavg, courseavg, grade); // functional call
outputfn(fname, lname, totalpts, progavg, testavg, courseavg, grade);
system("pause");
return 0;
}
// void fn without parameters
void headerfn(){
cout<<"012345678901234567890123456789012345678901234567890123456789"<<endl;
cout<<"************************************************************"<<endl;
cout<<"* *"<<endl;
cout<<"* IT Business Applications with C++ *"<<endl;
cout<<"* Programmer: John Doe *"<<endl;
cout<<"* Date: November 9, 2009 *"<<endl;
cout<<"* *"<<endl;
cout<<"* This program uses functions to read student *"<<endl;
cout<<"* information from keyboard and outputs *"<<endl;
cout<<"* the results to the monitor and a text file *"<<endl;
cout<<"* *"<<endl;
cout<<"************************************************************"<<endl;
}// end of headerfn
//******************************************************************************
//void fn with parameters
void namefn(string fname, string lname){
cout<<"Please enter your first and last name: ";
cin>>fname>>lname;
}// end of namefn
//******************************************************************************
//void fn with reference parameters
void inputfn(int prog1, int prog2, int prog3, int test1, int test2, int test3){
cout<<"Please enter the first program score: ";
cin>>prog1;
cout<<"Please enter the second program score: ";
cin>>prog2;
cout<<"Please enter the third program score: ";
cin>>prog3;
cout<<"Please enter the first test score: ";
cin>>test1;
cout<<"Please enter the second test score: ";
cin>>test2;
cout<<"Please enter the third test score: ";
cin>>test3;
}//end of inputfn
//******************************************************************************
void resultsfn(int &totalpts, float &progavg, float &testavg, float &courseavg, char &grade, int prog1, int prog2, int prog3, int test1, int test2, int test3){
totalpts = (prog1+prog2+prog3+test1+test2+test3);
progavg = (prog1+prog2+prog3)/3.0;
testavg = (test1+test2+test3)/3.0;
courseavg = (progavg+testavg)/2.0;
if (courseavg >=90 )grade='A';
else if (courseavg >=80 )grade='B';
else if (courseavg >=70 )grade='C';
else grade='F';
} //end of resultsfn
//******************************************************************************
void outputfn(string fname, string lname, int totalpts, float, progavg, float testavg, float courseavg, char grade){
cout<<"12345678901234567890123456789012345678901234567890123456789012345678901234567890"<<endl;
cout<<"================================================================================"<<endl;
cout<<left<<setw(20)<<"Student Name"<<setw(10)<<"Total"<<setw(10)<<"Program"<<setw(10)<<"Test"<<setw(10)<<"Course"<<setw(10)<<"Grade"<<endl;
cout<<right<<setw(26)<<"Points"<<setw(11)<<"Average"<<setw(10)<<"Average"<<setw(10)<<"Average"<<endl;
cout<<"--------------------------------------------------------------------------------"<<endl;
cout<<fixed<<showpoint<<setprecision(2);
cout<<left<<setw(20)<<first+" "+last<<setw(10)<<totalpts<<setw(10)<<progavg<<setw(10)<<testavg<<setw(10)<<courseavg<<setw(10)<<grade<<endl;
cout<<"======================================================================"<<endl;
fout<<"01234567890123456789012345678901234567890123456789123456789"<<endl;
fout<<"***********************************************************"<<endl;
fout<<"* IT210 Business Applications with C++ *"<<endl;
fout<<"* Programmer: John Doe *"<<endl;
fout<<"* Date: October 26, 2009 *"<<endl;
fout<<"* *"<<endl;
fout<<"* Program Assignment 2: Student Grades II *"<<endl;
fout<<"* *"<<endl;
fout<<"* This program reads student information from *"<<endl;
fout<<"* an input text file and outputs the result *"<<endl;
fout<<"* to the monitor as well as to a text file *"<<endl;
fout<<"* *"<<endl;
fout<<"***********************************************************"<<endl;
fout<<endl;
fout<<"1234567890123456789012345678901234567890123456789012345678901234567890"<<endl;
fout<<"======================================================================"<<endl;
fout<<left<<setw(20)<<"Student Name"<<setw(10)<<"Total"<<setw(10)<<"Program"<<setw(10)<<"Test"<<setw(10)<<"Course"<<setw(10)<<"Grade"<<endl;
fout<<right<<setw(26)<<"Points"<<setw(11)<<"Average"<<setw(10)<<"Average"<<setw(10)<<"Average"<<endl;
fout<<"----------------------------------------------------------------------"<<endl;
fout<<"======================================================================"<<endl;
fout.close();
} //end of outputfn