I'm getting this error and can't figure out why. I know this i am an ultra
n00b and it's probably a really simple answer but I've tried. I have included
<string> and using std namespace.
#include<cstdlib>#include<iostream>#include<string>#include<sstream>usingnamespacestd;intmain(intargc,char*argv[]){intiOption;intiEmployeeID;structEmployee_data{stringsName;intiID;floatfSalary;stringsDOB;stringsDOH;}cout<<"Welcome to employee database. Please choose from following options."<<endl<<endl;cout<<"1. List employee information."<<endl<<"2. Add employee information."<<endl<<"3. Delete employee information."<<endl<<"4. Edit employee information."<<endl<<"5. Save changes and exit."<<endl<<endl<<"Selection: ";cin>>iOption;switch(iOption){case1:{cout<<endl<<"You chose option 1, please enter ID# of Employee you would like to review."<<endl<<"Selection: ";cin>>iEmployeeID;break;}case2:{cout<<"You chose option 2, please enter ID# of Employee you would like to add."<<endl<<endl<<"ID#: ";getline(cin,Employee_data.iID);break;}case3:{cout<<"You chose option 3, please enter ID# of Employee you would like to delete."<<endl<<endl<<"ID#: ";cin>>iEmployeeID;break;}case4:{cout<<"You chose option 4, please enter ID# of Employee you would like to edit."<<endl<<endl<<"ID#: ";cin>>iEmployeeID;break;}// 1 list employee information. employee information includes. name, date of hire, date of birth// salary, employee id number.// delete employee information.// add employee information, take in name, date of hire, date of birth, salary, employee id number// store for later retrievalsystem("PAUSE");returnEXIT_SUCCESS;}}
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Sorry I think I found the mistake. I was trying to getline on an int value...
i've changed that but now am receiving. "expected primary expression before
'.'" along with a build error. I'm not sure what that means.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I'm getting this error and can't figure out why. I know this i am an ultra
n00b and it's probably a really simple answer but I've tried. I have included
<string> and using std namespace.
Sorry I think I found the mistake. I was trying to getline on an int value...
i've changed that but now am receiving. "expected primary expression before
'.'" along with a build error. I'm not sure what that means.