-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.cpp
More file actions
62 lines (57 loc) · 1.54 KB
/
Copy pathmain.cpp
File metadata and controls
62 lines (57 loc) · 1.54 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
/*
* File: main.cpp
* Author: Jake Smith
*
* Created on February 19, 2020, 1:09 PM
*/
#include <cstdlib>
#include "Dictionary.h"
using namespace std;
/*
*
*/
int main(int argc, char** argv) {
string choice2;
while(choice2 != "N" && choice2 != "No" && choice2 != "n"){
Dictionary call;
int choice;
cout << "Choose one of the sample texts: "<< endl;
cout << "(1) for sample text 1" << endl;
cout << "(2) for sample text 2" << endl;
cout << "(3) for sample text 3" << endl;
cout << "(4) for sample text 4" << endl;
cout << "(5) for sample text 5" << endl;
cout << "Choice: " ;
cin >> choice;
switch(choice)
{
case 1:
call.read_Rank("words.txt");
call.readSample("sample1.txt");
break;
case 2:
call.read_Rank("words.txt");
call.readSample("sample2.txt");
break;
case 3:
call.read_Rank("words.txt");
call.readSample("sample3.txt");
break;
case 4:
call.read_Rank("words.txt");
call.readSample("sample4.txt");
break;
case 5:
call.read_Rank("words.txt");
call.readSample("sample5.txt");
break;
default:
cout << "Not a valid input: " << endl;
break;
}
cout << "Would you like to choose another one? (Y/N) ";
cin >> choice2;
}
//system("pause");
return 0;
}