-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain.cpp
33 lines (31 loc) · 879 Bytes
/
main.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
#include <iostream>
#include <string>
#include "InputOutputClass.h"
#include "InputOutputFunc.cpp"
int main(int argc, char *argv[])
{
int num;
std::string str;
InputOutput io;
while(1) {
std::cout << std::endl;
std::cout << "/****** Input&Output ******/" << std::endl;
std::cout << "Please enter either 1 or 2." << std::endl;
std::cout << "[1]Input [2]Exit" << std::endl;
std::cin >> num;
if(num == 1) {
std::cout << "Input>";
std::cin >> str;
io.input(str);
std::cout << "Output>";
io.get();
} else if(num == 2) {
std::cout << "Thank you." << std::endl;
std::cout << std::endl;
break;
} else {
std::cout << "Invalid input, please try again." << std::endl;
}
}
return 0;
}