forked from ezaz039/Hactoberfest-2021
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtranslator.cpp
More file actions
46 lines (40 loc) · 774 Bytes
/
Copy pathtranslator.cpp
File metadata and controls
46 lines (40 loc) · 774 Bytes
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
#include <iostream>
#include <cstdlib>
#include <fstream>
using namespace std;
void display();
const string space = " ";
const string space2 = " ";
const int length = 38;
ifstream inFile;
ofstream outFile;
fstream english("ENG.txt");
fstream spanish("SPAN.txt");
int main()
{
string word, ENG[length], SPAN[length], save;
int num, lang;
display ();
for(num=0; num<=length; num++)
{
getline(english,save);
ENG[num]=save;
}
cin >> lang;
system("cls");
switch(lang)
{
case 1:
cout << "What word would you like to translate?" << endl;
cin >> word;
break;
}
return 0;
}
void display()
{
cout << space << "What would you like to translate to?\n" << endl;
cout << space2 << "1. Spanish" << endl;
cout << space2 << "2. English" << endl;
cout << space2 << "0. Exit" << endl;
}