#include <iostream>
#include <fstream>
using std::ifstream;
using std::ofstream;
using std::endl;
using namespace std;
int main(){
int choice;
ifstream inStream;
ofstream outStream;
cout << "Welcome, what would you like to do?" << endl << endl;
cout << "1. Read all data from database text files." << endl;
cout << "2. Calculate the weekly pay for each employee." << endl;
cout << "3. Add new employee to the companys database." << endl;
cout << "4. Remove one employee from the companys database." << endl;
cout << "5. Change the hourly rate for an employee, given his/her employee ID." << endl;
cout << "6. Change the positions/levels of an employee, given his/her employee ID." << endl;
cout << "7. Sort all employees based on their NetPay." << endl;
cout << "8. Report all the data for a specific employee, given his/her employee ID." << endl;
cout << "9. Report all the data for all employees in the company." << endl;
cout << "10. Write all the records to the database text file." << endl << endl;
cout << "Please specify your choice: ";
cin >> choice;
if (choice == 1)
{
cout << "Reading all data from MasterFile.txt" << endl;
ofstream fout;
fout.open("MasterFile.txt", ios::app);
if (fout.fail())
{
cout << "Input file reading failed." << endl;
}
cout << "Would you like to do something else? (1. Yes / 2. No): " << endl;
cin >> choice;
if (choice == 1)
{
main();
}
}
if (choice == 2)
//inStream.open("infile.txt");
//outStream.open("outfile.txt");
cin.ignore(256, '\n');
cout << "Press ENTER to continue..." << endl;
cin.get();
return 0;
}