-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain1.cpp
91 lines (74 loc) · 2.34 KB
/
main1.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
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
#include<cstdlib>
#include<cstring>
#include<iostream>
#include"admin2.cpp"
#include"user1.cpp"
using namespace std;
class Details
{
public:
std::string names,id,age,category,gender;
Details()
{
static int ptr;
ptr=ptr++;
}
void enteringdetails()
{
std::cout<<"Enter Name\n";
std::cin>>names;
std::cout<<"Enter Id \n";
std::cin>>id;
std::cout<<"Enter Category(A|U)? \n";
std::cin>>category;
std::cout<<"Enter Age \n";
std::cin>>age;
std::cout<<"Enter gender \n";
std::cin>>gender;
}
friend void counter()
{
}
};
int ptr =0;
class interface:virtual public Admin ,virtual public user
{
};
int main()
{
system("cls");
interface j,ne;
char ch='y';
int choice;
cout<<"*************************************************************\n\n";
cout<<"\t\tWelcome to Road Transport System\n\n";
cout<<"**************************************************************\n\n";
while(ch!='N'||'n')
{
cout<<"\t1) Login as User \n\n";
cout<<"\t2) Login as Admin \n\n";
cout<<"\t3)Exit the system \n\n";
cout<<"\tEnter your choice -------->>>>>>";
cin>>choice;
switch(choice)
{
case 1 : usinterface();
break;
case 2 : {
Classes::PasswordA a;
int returnval=a.check();
if(returnval==1)
{
adinterface();
}
}
break;
case 3: cout<<"Thank You for using \n \t\tBye!! \n ";
exit(0);
default:
cout<<"\tThe choice you selected is invalid \n";
cout<<"\tDo you want to retry? \n";
cin>>ch;
}
}
}