}
book_library.clear();
book_library.seekg(0, ios::beg);
book_library.close();
temp.close();
remove("book library.txt");
rename("temp.txt","book library.txt");
if(x=0)
{
cout<<"There are no books that you search"<<endl;
}
if(x=1)
{
cout<<"The book has been deleted"<<endl;
}
return 0;
}
void adv_search(book_library record[], int IBSN_no)
{
int choice, result;
char adv_srh_num[20], adv_srh_name[99],adv_srh_author[99];
char* compare;
while (true)
{
system("cls");
cout << setw(47) << "ADVANCED SEARCH" << endl;
cout << "1 - Search by IBSN \n2 - Search by book's name\n3 - Search by Author\n0 - Return\n";
cout << "Enter your choice: ";
cin >> choice;
switch (choice)
{
case 1:
{
system("cls");
result = 0;
cout << "Please enter a part of IBSN number or full IBSN number: ";
fflush(stdin);
cin.getline(adv_srh_num, 20);
cout << "-----------------------------------------------------------------\n";
for (int i = 0; i < IBSN_no; i++)
{
compare = strstr(record[i].IBSN, adv_srh_num);