A simple console-based Employee Management System developed using C++. This project demonstrates basic programming concepts, file handling, structures, functions, and CRUD operations using text files.
- Insert Employee – Add a new employee with a name, department, and salary.
- Search Employee – Find an employee using their ID.
- Update Employee – Modify existing employee details.
- View All Employees – Display all stored employee records.
- Automatic Employee ID Generation – Generate a new ID based on the highest existing employee ID.
- File Handling – Store employee records in a local text file.
- Menu-Driven Interface – Navigate through the system using a simple console menu.
- C++
- Standard C++ Library
- File Handling (
ifstream,ofstream) - String Processing (
stringstream) - Text File Storage
employee-management-system/
├── src/
│ └── main.cpp
├── data/
│ └── .gitkeep
├── .gitignore
├── LICENSE
└── README.md
- A C++ compiler such as GCC or MinGW
- Visual Studio Code or another C++ development environment
- A terminal or command prompt
git clone https://github.com/thisum-gamage/employee-management-system.gitcd employee-management-systemg++ -std=c++17 src/main.cpp -o employee-managementOn Windows:
.\employee-management.exeOn Linux or macOS:
./employee-managementRun the program from the project root directory so that the relative data file paths work correctly.
Employee records are stored locally in data/employees.txt.
The records use a comma-separated format:
1,John Smith,IT,75000
2,Jane Doe,HR,65000
The program creates or appends to the employee data file when inserting records, provided the data directory exists.
- Structures (
struct) - Functions and modular programming
- Loops and conditional statements
- File input and output
- String streams and parsing
- Automatic ID generation
- Searching and updating records
- Temporary files for record updates
- Basic CRUD operations
- This is a beginner-level console application.
- Data is stored in a local text file rather than a database.
- Input validation and malformed-record handling can be improved.
- Commas in employee names or department names are not supported by the current storage format.
- The application does not include authentication or multi-user access control.
- Add employee deletion functionality.
- Improve input validation and error handling.
- Add sorting and filtering options.
- Introduce a database such as SQLite.
- Improve the console interface.
- Add automated tests.
This project is distributed under the MIT License. See the LICENSE file for details.