RCMS.cpp
/********************DISPLAYING ALL THE RECORDS********************/
/*
Displays all of the personal information for each of the students.
The list of students are stored in the file 'Record.dat', so if that file is
not found, then the whole program will not work
*/
DISPLAYING ALL THE RECORDS
Displays all of the personal information for each of the students.
The list of students are stored in the file 'Record.dat', so if that file is
not found, then the whole program will not work
DISPLAYING ALL THE RECORDS Displays all of the personal information for each of the students . The list of students are stored in the file ' Record . dat ' so if that file is not found then the whole program will not work
void display_all() {
    STUDENT s;
    ifstream f("Record.dat");
    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 << "\t\t\t  ---------------------------" << "\n";
        cout << "\t\t\t     LIST OF CLASS RECORDS" << "\n";
        cout << "\t\t\t  ---------------------------" << "\n\n";
        while (f.read((char *) &s, sizeof(s))) {
            s.display_all();
            cout << "\n\n\n\t\t---------------------------------------------\n\n\n";
        }
    }
    f.close();
}
void display_all ( ) { STUDENT s ; ifstream f ( " " ) ; 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 << " \t \t \t " << " \n " ; cout << " \t \t \t " << " \n " ; cout << " \t \t \t " << " \n \n " ; while ( f . read ( ( char * ) & s , sizeof ( s ) ) ) { s . display_all ( ) ; cout << " \n \n \n \t \t \n \n \n " ; } } f . close ( ) ; }
DISPLAYING ALL THE RECORDS
Displays all of the personal information for each of the students.
DISPLAYING ALL THE RECORDS Displays all of the personal information for each of the students .