i am having some problems with this program. i have hilighted the areas in red that have errors.
and all cout and cin come up undecleared.Code:#include <iostream> #include <fstream> #include <cstdlib> #include <time.h> #include <cstring> struct strct { int id_number; float salery; int report; }; string name; string position; string read; int x,y,max,min; void name_id_promp(); void salery(); void lvl_of_employment(); void evaluate(); void save(); void clse(); int randombet(int max,int min); int main() { while(x != 0) { time_t seconds; time(&seconds); srand((unsigned int) seconds); strct numb; ofstream data_1( "C:\Documents and Settings\steven bayer\My Documents\employee",iso::app ); data_1.close(); ifstream data( "C:\Documents and Settings\steven bayer\My Documents\employee",iso::app ); if( !data.isopen() ) cout<<"File could not be opened. \nreason not sepcified"<<endl; else { cout<<"menu \n"<<"1) add employee \n"<<"2) check database \n"<<"Make a random number"<<endl; cin>> y; switch(y) { case 1: void name_id_promp(); void salery(); void lvl_of_employment(); void evaluate(); void save(); case 2: data>> read; cout<<read<<endl; case 3: cout<<"enter a random max and min"<<endl; cin>>max>>min; default: cout<<"ban input ending program"; } } } } void name_id_promp() { cout<<"What is your employees name?"<<endl; cin>>name; cout<<"What is "<<name<<"'s id number?"<<endl; cin>> numb.id_number; } void salery() { cout<<"How much is employee ["<<name<<"] being payed per hour"<<endl; cin>> numb.salery; } void lvl_of_employment() { cout<<"The level of employment for employee:"<<numb.id_number<<endl; cin>> position; } void evaluate() { cout<<"Give a '-5' to '5' value"<<endl; cin>> numb.report; } void save() { data<<name<<endl; data<<numb.id_number<<endl; data<<numb.salery<<endl;; data<<numb.report<<endl; data<<read<<endl<<endl; } void clse() { data.close(); cout<<"Program close"<<endl; } int randombet(int max,int min) { cout<<rand() % (max - min + 1) + min; }



LinkBack URL
About LinkBacks


