-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.cpp
More file actions
35 lines (28 loc) · 964 Bytes
/
Copy pathmain.cpp
File metadata and controls
35 lines (28 loc) · 964 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
/*
Skeleton code for External storage management
*/
#include <string>
#include <ios>
#include <fstream>
#include <vector>
#include <string>
#include <string.h>
#include <iostream>
#include <sstream>
#include <stdexcept>
#include <cmath>
#include "classes.h"
using namespace std;
int main(int argc, char* const argv[]) {
// Initialize the Storage Manager Class with the Binary .dat file name we want to create
StorageManager manager("EmployeeRelation.dat");
// Assuming the Employee.CSV file is in the same directory,
// we want to read from the Employee.csv and write into the new data_file
manager.createFromFile("Employee.csv");
// You'll receive employee IDs as arguments. For each, process it to retrieve the record, or display a message if not found.
for (int i = 1; i < argc; ++i) {
int emp_id = stoi(argv[i]);
manager.findAndPrintEmployee(emp_id);
}
return 0;
}