I am going to paste my code. It for what is there, I thin kit should run, but I am getting some wierd errors that I cannot fix. Take a look and see if you can see what is wrong.
Code:#include<iostream> #include<fstream> #include<string> using namespace std; class employee { public: string lname; string fname; string address; string city; string state; string zip; char hos; int payrate; int hours; int dependents; int gpay; int fed; int state1; int social; int net; int compute(int payrate, int hours, int dependents, int gpay, int fed, int state1, int social, int net, char hos); }; int main() { string in; string out; cout<<"Enter the name of the file you want to write to."; cin>>out; cout<<"Enter the name of the file you want to read from."; cin>>in; ifstream instream; instream.open(in, ios::in); ofstream outstream; outstream.open(string out); employee::compute(int payrate, int hours, int dependents, int gpay, int fed, int state1, int social, int net, char hos); instream.close(); ofstream.close(); return 0; } int compute(int payrate, int hours, int dependents, int gpay, int fed, int state1, int social, int net, char hos) { if(hos=='h'||'H')gpay=hours*payrate*100; if(hos=='s'||'S')gpay=payrate/26*100; fed=(gpay*26)-(2500*dependents)*(.28/.26)*100; state1=gpay*.048*100; social=gpay*.075*100; return (gpay, fed, state1, social); }



LinkBack URL
About LinkBacks


