Question: Help me get this code working with this additional class? RolodexEntryManager.cpp ------------------------------------- #include #include RolodexEntry.h #include #include #include using namespace std; //function dec void printMainMenu();
Help me get this code working with this additional class?
RolodexEntryManager.cpp
------------------------------------- #include
using namespace std;
//function dec void printMainMenu(); void printEditMenu(vector
int main(void) { bool isRunning = true; vector
eraseEntry(list, c-1);//resizes and moves back break; } case '4': case 's': { printSearchMenu(list); break; } case '5': case 'p': { printList(list); break; } case '6': case 'q': { isRunning = false; break; } default: { cout
return 0; } void printMainMenu() { cout & list) { cout > c; cin.ignore(INT_MAX, ' '); editContactSub(c, list); return; } void editContactSub(const short c, vector
//edit menu cout > sel; cin.ignore(INT_MAX, ' ');
switch(tolower(sel)) { case '1': case 'f': { cout > newName; edited.setFName(newName); break; } case '2': case 'l': { cout > newName; edited.setLName(newName); break; } case '3': case 'a': { cout
cout
cout
cout > newzip; if(newzip > 99999)//long zip { edited.setZip(newzip); edited.setSZipLong();//finds szip from long zip } else { edited.setSZip(newzip); } break; } case '4': case 'p': { cout > newarea; edited.setArea(newarea);
cout > newex; edited.setExchange(newex);
cout > newLine; edited.setPLine(newLine); break; } case '5': case 'e': { cout > newemail; edited.setEmail(newemail); break; } } } else { cout & list)//and work { cout
char c; cin >> c; cin.ignore(INT_MAX, ' '); switch(tolower(c)) { case '1': case 'n': { cout
for(vector for(vector while(cin.fail()) { cin.clear(); cin.ignore(); } cin >> search; for(vector for(vector if (pos = 0) { for (k = pos + 1; k != list.size(); k++) { list[k - 1] = list[k]; } list.pop_back(); } else { cout using namespace std; void RolodexEntry::printEntry() { cout > fName; cout > lName; cout cout cout cout > tempZip; if(tempZip > 99999)//long zip { zip = tempZip; setSZipLong();//finds szip from long zip } else { szip = tempZip; } cout > area >> exchange >> line; cout > email; } ---------------------------------------------------------------------- RolodexEntry.h ----------------------------------------- #ifndef ROLODEXENTRY_H_INCLUDED #define ROLODEXENTRY_H_INCLUDED #include std::string getFName() const {return fName;} void setFName(std::string first){fName = first;} std::string getLName() const {return lName;} void setLName(std::string last){lName = last;} std::string getStreet() const{return street;} void setStreet(std::string str){street = str;} std::string getTown() const {return town;} void setTown(std::string newtown){town = newtown;} std::string getState() const {return state;} void setState(std::string newstate){state = newstate;} long getZip() const {return zip;} void setZip(long newzip){zip = newzip;} short getSZip() const {return szip;} void setSZipLong(){szip = zip / 10000;} void setSZip(short newszip){szip = newszip;} short getArea() const {return area;} void setArea(short newarea){area = newarea;} short getExchange() const {return exchange;} void setExchange(short exch){exchange = exch;} short getPLine() const {return line;} void setPLine(short newline){line = newline;} std::string getEmail(){return email;} void setEmail(std::string Email){email = Email;} void printEntry();//other fns void readIn(); bool isEqual(RolodexEntry e){return e.fName == fName && e.lName == lName && e.street == street && e.town == town && e.state == state && e.zip == zip && e.szip == szip && e.area == area && e.exchange == exchange && e.line == line && e.email == email;} }; #endif // ROLODEXENTRY_H_INCLUDED
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
