1234567891011121314151617181920212223242526272829303132333435
//the view function void view() { char choice3; //opening the Records file Records = fopen("Records.txt","a+"); do { fgets(info,SIZE,Records); printf("%s\n",info); }while(!feof(Records)); fclose(Records); system("pause"); printf("Search for records??(Y/N)\n"); scanf("%c",&choice3); fflush(stdin); if (toupper(choice3)=='Y') { search(); } else if(toupper(choice3)=='N') { fclose(Records); system("pause"); system("cls"); main_function(); } else { fclose(Records); system("cls"); } }
//the view function void view() { char choice3; //opening the Records file Records = fopen("Records.txt","a+"); do { fgets(info,SIZE,Records); cout << info; }while(!feof(Records)); fclose(Records); system("pause"); cout << "Search for records??(Y/N)" << endl; cin >> choice3; fflush(stdin); if (toupper(choice3)=='Y') { search(); } else if(toupper(choice3)=='N') { fclose(Records); system("pause"); system("cls"); main_function(); } else { fclose(Records); system("cls"); } }
system("cls");
system("pause");