//Code C++ In One Day Chapter4 //C++ In One Day: The Ultimate Beginners Guide To C++ With 7 Awesome Projects by Ean, W.B. #include #include #include using namespace std; // Declaring the function used, not included in the book // If omitted, then the whole function block must reside here void NewContact(); void SearchByID(); void SearchByName(); vector Names; vector Phones; int main() { int sel = 0; while( true) { cout <<"My Agenda + +\n\n"; cout <<"Choose a number to execute an option\n\n"; cout <<"[ 1] New Contact\n"; cout <<"[ 2] Search by ID\n"; cout <<"[ 3] Search by Name\n"; cout <<"[ 4] Exit\n"; cout <<"Your choice: "; cin>> sel; switch( sel) { case 1: NewContact(); break; case 2: SearchByID(); break; case 3: SearchByName(); break; } if( sel == 4) { break; } } return 0; } void NewContact() { string name; string phone; cout <<"\n\nEnter a name for the contact: "; cin>> name; cout <<"Enter the phone for this contact: "; cin>> phone; cout <<"The ID for this contact will be " <> value; if( value>= Names.size()) { cout <<"This ID does not exist\n\n"; return; } cout <<"Information for contact " <> name; for( int i = 0; i != Names.size(); i++) { if( Names[ i] == name) { cout <<"Name: " <