RCMS.cpp
/******************SEARCING FOR A RECORD (TEACHER)******************/
/*
An individual with Teacher level access does not need the secure passcode to read a student's record

So, the teacher enters the roll number of a particular student, and the record with the matching roll number
is displayed using the display_report() function

If a student with the enterred roll number is not found, the teacher goes back to the Teacher() function
*/
SEARCING FOR A RECORD (TEACHER)
An individual with Teacher level access does not need the secure passcode to read a student's record

So, the teacher enters the roll number of a particular student, and the record with the matching roll number
is displayed using the display_report() function

If a student with the enterred roll number is not found, the teacher goes back to the Teacher() function
SEARCING FOR A RECORD ( TEACHER ) An individual with Teacher level access does not need the secure passcode to read a student ' s record So the teacher enters the roll number of a particular student and the record with the matching roll number is displayed using the display_report () function If a student with the enterred roll number is not found the teacher goes back to the Teacher () function
void search() {
    STUDENT s;
    ifstream f("Record.dat");
    int n, flag = 0;
    if (!f) {
        cout << "\n\n\n\n\n\n\n\n\n\n\n\t\t\t\tFILE NOT FOUND!";
        cout << "\n\n\n\n\n\n\n\n";
    } else {
        cout << "\n\n\n\n\n\n\n\n\n\n\n\t\t";
        cout << "ENTER THE ROLL NUMBER OF THE STUDENT: ";
        cin >> n;
        system("cls");
        while (f.read((char *) &s, sizeof(s))) {
            if (n == s.roll_number) {
                flag = 1;
                s.display_report();
            }
        }
        if (flag == 0) {
            cout << "\n\n\n\n\n\n\n\n\n\n\n\t\t\t\tRECORD NOT FOUND!";
            cout << "\n\n\n\n\n\n\n\n";
        }
    }
    f.close();
}
void search ( ) { STUDENT s ; ifstream f ( " " ) ; int n , flag = 0 ; if ( ! f ) { cout << " \n \n \n \n \n \n \n \n \n \n \n \t \t \t \t " ; cout << " \n \n \n \n \n \n \n \n " ; } else { cout << " \n \n \n \n \n \n \n \n \n \n \n \t \t " ; cout << " " ; cin >> n ; system ( " " ) ; while ( f . read ( ( char * ) & s , sizeof ( s ) ) ) { if ( n == s . roll_number ) { flag = 1 ; s . display_report ( ) ; } } if ( flag == 0 ) { cout << " \n \n \n \n \n \n \n \n \n \n \n \t \t \t \t " ; cout << " \n \n \n \n \n \n \n \n " ; } } f . close ( ) ; }
SEARCING FOR A RECORD (TEACHER)
An individual with Teacher level access does not need the secure passcode to read a student's record
SEARCING FOR A RECORD ( TEACHER ) An individual with Teacher level access does not need the secure passcode to read a student ' s record