-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.cpp
More file actions
93 lines (90 loc) · 2.1 KB
/
main.cpp
File metadata and controls
93 lines (90 loc) · 2.1 KB
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
92
93
#include <iostream>
#include "I:\c++\Text-editor\headers\utility.h"
//___________________________
using namespace std;
//__________________________
int main()
{
bool program_running = true;
string choice;
fstream file_read_app, file_read_write;
load_file_read_append(file_read_app);
load_file_read_write(file_read_write);
display_menu(choice, true);
// while true
while (program_running)
{
if (choice == "1")
{
add_text(file_read_app);
}
else if (choice == "2")
{
display_the_content(file_read_app);
}
else if (choice == "3")
{
Empty_the_file();
}
else if (choice == "4")
{
encrypt_file(file_read_write);
}
else if (choice == "5")
{
decrypt_file(file_read_write);
}
else if (choice == "6")
{
merge(file_read_app);
}
else if (choice == "7")
{
count_words(file_read_app);
}
else if (choice == "8")
{
count_chars(file_read_app);
}
else if (choice == "9")
{
count_lines(file_read_app);
}
else if (choice == "10")
{
search_for_aword_in_file(file_read_app);
}
else if (choice == "11")
{
count_n_of_word(file_read_app);
}
else if (choice == "12")
{
convertToUpper(file_read_write);
}
else if (choice == "13")
{
convertToLower(file_read_write);
}
else if (choice == "14")
{
convertFToUpper(file_read_write);
}
else if (choice == "15")
{
save();
}
else if (choice == "16")
{
program_running = false;
break;
}
else
{
cout << "#################" << endl;
cout << "!! invalid !!" << endl;
cout << "#################" << endl;
}
display_menu(choice, false);
}
}