I'm trying to create a info manager like rolodex.
Rolodex.cpp
List() function
Add() functionCode:void Rolodex::List() { list<string>::iterator cIterator; for (cIterator = cardlist.begin(); cIterator != cardlist.end(); ++cIterator) { cout << *cIterator << endl; //outputs its contents } }//end List Function
private member in rolodex class:Code:void Rolodex::Add(list<Rolocard>& cardlist) { string first, last, add, occ, phone; cout << "Creating new Card "<< endl; cout << "----------------------"<<endl; cout << "Enter First Name: " << endl; cin >> first; cout << "Enter Last Name: "<< endl; cin >> last; cout << "Enter Address: "<< endl; cin >> add; cout << "Enter Occupation: " << endl; cin >> occ; cout << "Enter Phone Number: " << endl; cin >> phone; Rolocard newcard(first, last, add, occ, phone); cardlist.push_back(newcard); }
list <Rolocard> sCard;
---------------------------------------------------------
what is the issue with this code?



LinkBack URL
About LinkBacks


