Skip to content

Commit cb0df5d

Browse files
Initial Commit
0 parents  commit cb0df5d

File tree

4 files changed

+407
-0
lines changed

4 files changed

+407
-0
lines changed

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
*.exe
2+
.vscode/

README.md

Lines changed: 75 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,75 @@
1+
# Employee Management System (C++)
2+
3+
A simple command-line Employee Management System written in C++ using STL containers and file I/O.
4+
5+
## Features
6+
7+
- Add new employees
8+
- Display all employees
9+
- Search for an employee by ID
10+
- Update employee details
11+
- Delete an employee
12+
- Sort employees by salary or joining date (ID)
13+
- Save and load employee data from a CSV file (`employees.csv`)
14+
15+
## How It Works
16+
17+
- Employee data is stored in a `vector<Employee>`.
18+
- Data is persisted in a CSV file (`employees.csv`) in the same directory.
19+
- All operations are performed via a text-based menu.
20+
21+
## Usage
22+
23+
### Compile
24+
25+
```sh
26+
g++ -o employee_mgmt stlEmployee.cpp
27+
```
28+
For static build (dll(s) not required
29+
)
30+
```sh
31+
g++ -static -o employee_mgmt.exe stlEmployee.cpp
32+
```
33+
### Run
34+
35+
```sh
36+
./employee_mgmt
37+
```
38+
39+
### Menu Options
40+
41+
1. Display all employees
42+
2. Search employee
43+
3. Add employees
44+
4. Update an employee
45+
5. Delete an employee
46+
6. Sort Employees
47+
7. Save all changes
48+
8. Exit the program
49+
50+
## File Format
51+
52+
The `employees.csv` file uses the following format:
53+
54+
```
55+
id,name,department,salary
56+
```
57+
58+
Example:
59+
60+
```
61+
1,John Doe,HR,50000
62+
2,Jane Smith,IT,60000
63+
```
64+
65+
## Requirements
66+
67+
- C++11 or later
68+
- Standard C++ STL
69+
70+
## Notes
71+
72+
- Data is only saved to `employees.csv` when you choose the "Save all changes" option.
73+
- On startup, the program loads existing data from `employees.csv` if it exists.
74+
75+
---

employees.csv

Whitespace-only changes.

0 commit comments

Comments
 (0)