-
Notifications
You must be signed in to change notification settings - Fork 52
/
studentrecordmanagement.cpp
69 lines (51 loc) · 1.47 KB
/
studentrecordmanagement.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
#include <iostream>
#include "loading.h"
#include <string>
#include <Windows.h>
#include "adminFunction.h"
using namespace std;
void passwordVerification(void);
void mainMenu(void);
//Auth Before opening the main program
void passwordVerification()
{
system("cls");
string password;
cout << "\n\n\n\n\n\t\t\t\t\t";
cout << "\n\n\n\t\t\t\t\tEnter Password : ";
do
{
cin >> password;
if (password != "password")
{
system("cls");
cout << "\n\n\n\n\n\t\t"
<< "wrong password!, try again or type 'quit' / 'exit' to Quit The program.";
cout << "\n\n\n\t\t\t\t\tEnter Password : ";
}
if (password == "Quit" || password == "quit" || password == "exit" || password == "Exit" || password == "QUIT" || password == "EXIT")
{
system("cls");
cout << "\t\t\n\n\n\n\n\n\n\t\t\t\t\tQuitting The Program";
for (int i = 0; i < 4; i++)
{
Sleep(1000); // 1 second pause;
cout << ".";
}
exit(0);
}
}
while (password != "password");
mainMenu(); // main menu function is in the Header File adminFunction.h
}
int main()
{
// fast io
ios_base::sync_with_stdio(false);
cin.tie(NULL);
cout.tie(NULL);
//loadingBar(); // loadingBar() is in the loading.h header for loading animation.
system("color 9F");
passwordVerification();
return 0;
}