// MainDelMenu.cpp: implementation of the MainDelMenu class. // ////////////////////////////////////////////////////////////////////// #include "stdafx.h" #include "MainDelMenu.h" MainDelMenu::doMainStrategy() { int num = contact_item.size(); int index = 0; string addr = ".\\contact\\"; system("cls"); cout< 1){ printAll(); cout<<"\n\tEnter the INDEX(1 - "<>index; if ((index<0) || (index>num)){ cout<<"\n\n\t\tError Input!\n"; cin.clear(); cin.sync(); getch(); index = 0; } } else if ( num == 1) index = 1; if (index == 0) return 0; index--; print_prsn(*contact_item[index],"=====Delete Contact====================\n",true); delete_prsn(*contact_item[index]); cin.clear(); cin.sync(); getchar(); return 0; }