A simple command-line Employee Management System written in C++ using STL containers and file I/O.
- Add new employees
- Display all employees
- Search for an employee by ID
- Update employee details
- Delete an employee
- Sort employees by salary or joining date (ID)
- Save and load employee data from a CSV file (
employees.csv
)
- Employee data is stored in a
vector<Employee>
. - Data is persisted in a CSV file (
employees.csv
) in the same directory. - All operations are performed via a text-based menu.
g++ -o employee_mgmt stlEmployee.cpp
For static build (dll(s) not required )
g++ -static -o employee_mgmt.exe stlEmployee.cpp
./employee_mgmt
- Display all employees
- Search employee
- Add employees
- Update an employee
- Delete an employee
- Sort Employees
- Save all changes
- Exit the program
The employees.csv
file uses the following format:
id,name,department,salary
Example:
1,John Doe,HR,50000
2,Jane Smith,IT,60000
- C++11 or later
- Standard C++ STL
- Data is only saved to
employees.csv
when you choose the "Save all changes" option. - On startup, the program loads existing data from
employees.csv
if it exists.