Databases are being used in every aspect of our lives right now. Trillions of bytes of data are being stored in servers around the world. SQL is one of the most basic methods to use such a database. But have you ever thought about using C++ to maintain such a database. In this post, we will talk about implementing different views on a text file according to the type of user and edit accordingly.
The data stored using this code are:
1) Registration number
3) Marks in CSE1001
4) Marks in CSE1002
5) Proctor ID
Following code is a simple implementation of Student Management Project written in C++
Available operations: 1. Add New Students 2. Student Login 3. Faculty Login 4. Proctor Login 5. Admin View 6. Exit Enter option: 1 Enter the number of students: 2 Enter your registration number: 15BCE2083 Enter your name: Dheeraj Enter your proctor ID: 1001 Enter your registration number: 15BCE2082 Enter your name: Rohan Enter your proctor ID: 1002 Available operations: 1. Add New Students 2. Student Login 3. Faculty Login 4. Proctor Login 5. Admin View 6. Exit Enter option: 3 Enter your subject code: CSE1001 Available operations: 1. Add data about marks 2. View data Enter option: 1 Warning! You would need to add mark details for all the students! Enter the mark of student#1 : 52 Enter the mark of student#2 : 89 No such subject code found! Available operations: 1. Add New Students 2. Student Login 3. Faculty Login 4. Proctor Login 5. Admin View 6. Exit Enter option: 5 Enter the admin password: admin Reg No. Name CSE1001 CSE1002 Proctor ID 15BCE2083 Dheeraj 52 00 1001 15BCE2082 Rohan 89 00 1002 Available operations: 1. Add New Students 2. Student Login 3. Faculty Login 4. Proctor Login 5. Admin View 6. Exit Enter option: 6 ------------------ (program exited with code: 0) Press return to continue
Do note that I have set the pointer position according to the length of the data I am entering in the text file. Some of the things which I had assumed are the registration number is always 9 characters long, subject code is either CSE1001/CSE1002, proctor ID is 4 characters long, marks is just 2 characters long. You would need to change the code accordingly if you want to enter some other type of data.
This article is contributed by Dheeraj Nair. If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to email@example.com. See your article appearing on the GeeksforGeeks main page and help other Geeks.
Please write comments if you find anything incorrect, or you want to share more information about the topic discussed above.
- Student Information Management System
- GUI Application for the Student Management System
- How to Become a Microsoft Student Partner (MSP)?
- Java program to store a Student Information in a File using AWT
- Difference between Data Scientist, Data Engineer, Data Analyst
- Automatic Resource Management in Java | try with resource statements
- Project Idea | Smart Waste Management System
- Project Idea | Smart Waste Management Systems
- Software Engineering | System configuration management
- Perl | Database management using DBI
- Advantages of Database Management System
- Identity and Access Management
- File Management in Linux
- Levels in a File Management System
- Hotel Management System
- Program for Employee Management System
- Examination Management System in C
- Menu-Driven Program for Bank Management System
- Difference between Data Warehousing and Data Mining
- Primitive data type vs. Object data type in Java with Examples
Improved By : vardhankumar28