This project is a simple attendance management system built using C++.
It runs in a terminal (CLI) environment and allows users to:
- Record student attendance using a student ID (NIM)
- Prevent duplicate attendance entries
- Cancel or remove attendance records
- Display attendance data along with timestamps
The system is designed for learning purposes and demonstrates the use of arrays, structures, functions, and basic input validation in C++.
This repository contains two source files with the same system logic but different implementations for the delay function (Sleep), depending on the operating system.
-
main-windows.cpp
UsesSleep()from the<windows.h>library. -
main-linux.cpp
Usesstd::this_thread::sleep_for(std::chrono::milliseconds(ms))from the C++ standard library.
Aside from the delay implementation, both files are functionally identical.
- CLI-based interactive menu
- Attendance recording based on valid student data
- Duplicate attendance prevention
- Attendance cancellation with confirmation
- Automatic timestamp generation
- Simple and structured program flow
The system is divided into several logical parts:
- Data Structures
AttendanceCreatefor valid student dataAttendanceEntryfor attendance rec
Note
Make sure you are using a compiler that supports C++11 or newer.
g++ main-windows.cpp -o attendance.exe && ./attendance.exeg++ main-linux.cpp -o attendance && ./attendance