A console-based Library Management System built in C++ using file handling and object-oriented programming. It allows librarians to manage books and students, and handles book issuing and return with automated fine calculation.
| Module | Operations |
|---|---|
| Books | Add, display, modify, delete |
| Students | Add, display, modify, delete |
| Book Issue | Issue a book to a student (one book per student) |
| Book Deposit | Return a book with fine calculation (₹1/day after 15 days) |
| Reports | List all books / all students |
Main Menu
├── 1. Book Issue
├── 2. Book Deposit
├── 3. Administrator Menu
│ ├── Create / Display / Modify / Delete Student Records
│ ├── Create / Display / Modify / Delete Book Records
│ └── Back to Main Menu
└── 4. Exit
book
- Stores book number, book name, and author name
- Methods:
createbook(),showbook(),modifybook(),report()
student
- Stores admission number, name, issued book number, and token (issue status)
- Methods:
createstudent(),showstudent(),modifystudent(),report() - Token system:
0= no book issued,1= book currently issued
Records are persisted to binary files using C++ file streams (fstream):
| File | Contents |
|---|---|
book.dat |
All book records |
student.dat |
All student records |
- Turbo C++ (originally written for DOS-era compiler)
- To compile on modern systems, replace legacy headers:
| Legacy Header | Modern Equivalent |
|---|---|
iostream.h |
iostream |
fstream.h |
fstream |
iomanip.h |
iomanip |
conio.h |
Remove / replace clrscr(), getch() |
stdlib.h |
cstdlib |
g++ LMSCode.cpp -o lms
./lms
⚠️ You may need to remove or stub outclrscr(),getch(), andgotoxy()calls, as these are Turbo C++ specific.
- Only one book can be issued per student at a time.
- Book and admission numbers are limited to 5 characters.
- No password protection on the Administrator menu.
- Fine rate is hardcoded at ₹1/day (after a 15-day grace period).
- Built for Turbo C++ — minor refactoring needed for modern compilers.
- Migrate to modern C++ (
std::string,std::vector, STL file I/O) - Add login authentication for the admin panel
- Support multiple book issuance per student
- Replace binary file storage with SQLite for reliability
- Add a due-date tracker instead of manual day entry
Chahat — Academic project demonstrating file handling and OOP in C++.