A simple console-based Student Management System written in C++.
Supports adding, updating, deleting, searching, sorting students, and saving/loading from a CSV file.
- Add, update, delete students
- Display all students
- Search by ID or name
- Statistics (total, average, min, max grades)
- Sort by ID, name, or average
- Save/load students to/from CSV file
- C++17 compiler (
g++,clang++, MSVC) - CMake (optional, recommended for large projects)
- Ninja or MinGW Makefiles (optional, for building with CMake)
Cross-platform solution for Windows and Linux.
- Create a build directory:
cmake -S . -B build -G "MinGW Makefiles"On Linux, you can use
-G "Unix Makefiles"or-G "Ninja"if installed.
- Build the project:
cmake --build build- Run the executable:
- Windows:
build\main.exe- Linux:
./build/mainFor small projects or if you don’t want to use CMake:
g++ main.cpp FileManager.cpp InputUtils.cpp StudentRepository.cpp -std=c++17 -Wall -Wextra -O2 -o mainRun:
- Windows:
main.exe- Linux:
./main.
├── main.cpp
├── StudentRepository.cpp
├── StudentRepository.h
├── FileManager.cpp
├── FileManager.h
├── InputUtils.cpp
├── InputUtils.h
├── students.csv # Optional, auto-created at runtime
├── README.md
├── .gitignore
└── CMakeLists.txt # Optional, for CMake builds
- Make sure
students.csvexists or will be created in the same folder as the executable. - On Windows, it is recommended to use MSYS2 or MinGW for building with CMake.
- On Linux, make sure you have
g++andmakeinstalled.