C Include Include Include Include Addressbooktypeh Using Namespace Std Void Loadaddressboo Q37153324

C++

Instructions Programming Exercise 5in Chapter 11 could handle a maximum of only 500 entries. Using linkedList objects, redo t

#include <iostream>
#include <fstream>
#include <string>
#include “addressBookType.h”

using namespace std;

void loadAddressBook(addressBookType& adBook, bool&flag);
void showMenu();

int main()
{
addressBookType addressBook;
string str;
string str1;
string str2;
int choice;
int loc;
int month;

bool flag = false;

loadAddressBook(addressBook, flag);

if (flag)
{
cout << “Input file does not exist.” << endl
<< “Program terminates!!!!” << endl;
return 1;
}

addressBook.sort();

showMenu();

cin >> choice;
cin.ignore(100, ‘n’);

while (choice != 9)
{
switch (choice)
{
case 1:
cout << “Enter the last name of the person: “;
getline(cin , str);
cout << endl;

loc = addressBook.search(str);

if (loc != -1)
   cout << str << ” is in the address book”<< endl;
else
cout << str << ”

OR
OR

Leave a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.