-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain.cpp
61 lines (48 loc) · 1.29 KB
/
main.cpp
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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
#include <iostream>
#include <fstream>
#include <string.h>
#include <iomanip>
#include "phonebook1.h"
using namespace std;
using namespace register1;
int main()
{
phoneBook rec;
int choice;
while(1)
{
char nm[20];
cout<<"\n*****Phone Book*****\n";
cout<<"1) Add New Record\n";
cout<<"2) Display All Records\n";
cout<<"3) Search Telephone No.\n";
cout<<"4) Search Person Name\n";
cout<<"5) Update Telephone No.\n";
cout<<"6) Delete a record \n";
cout<<"7) Exit\n";
cout<<"Choose your choice : ";
cin>>choice;
switch(choice)
{
case 1 : rec.newrecord();
break;
case 2 : rec.display();
break;
case 3 :
cout<<"\n\nEnter Name : ";
cin>>nm;
rec.display(nm);
break;
case 4 :rec.searchpname();
break;
case 5 :rec.updatetelno();
break;
case 6: rec.deleterec();
break;
case 7: exit(1);
default:
cout<<"Invalid Option!!"<<endl;
}
}
return 0;
}