hey,i need help here....i need codes on how to auto generate id ...
Code:#include <iostream> #include <string> #include <fstream> #include "staffDetails.h" using namespace std; void staffDetails::getStaffInfo() { char yes; cout<<"Please enter staff's name:"; cin>>name>>endl; cout<<"Please enter staff's address:"; cin>>address>>endl; cout<<"Please enter staff's ID number:"; cin>>SID>>endl; cout<<"Please enter staff's c number:"; cin>>c_no>>endl; save(); } void staffDetails::save() { fstream instaff; instaff.open("staff.dat",ios::in|ios::app); if(instaff.fail()) { cerr<<"File opening error!"; exit(-1); } instaff>>name>>address>>SID>>c_no; instaff.close(); } >