-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMainMdfMenu.cpp
More file actions
41 lines (37 loc) · 810 Bytes
/
MainMdfMenu.cpp
File metadata and controls
41 lines (37 loc) · 810 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
// MainMdfMenu.cpp: implementation of the MainMdfMenu class.
//
//////////////////////////////////////////////////////////////////////
#include "stdafx.h"
#include "MainMdfMenu.h"
MainMdfMenu::doMainStrategy()
{
int num = contact_item.size();
int index = 0;
system("cls");
cout<<endl;
cout<<"=====Modify Contact====================\n\n";
if (num > 1){
printAll();
cout<<"\n\tEnter the INDEX(1 - "<<num<<") of the information you want to MODIFY:(0 for quit) ";
cin.clear();
cin.sync();
cin>>index;
if ( (index<0) || (index>num) ){
cout<<"\n\t\tError Input!\n";
cin.clear();
cin.sync();
getch();
index = 0;
}
}
else if ( num == 1)
index = 1;
if (index == 0)
return 0;
index--;
modify_prsn(*contact_item.at(index));
cin.clear();
cin.sync();
getch();
return 0;
}