⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 returnbook.cpp

📁 图书馆管理系统 包括界面、书籍管理、会员管理等内容
💻 CPP
字号:
/*****************Function To Return Book To The Library*********************/
# include"liba.h"

void retbook()
{
   struct transaction T;
   window(1,1,80,2);
   textbackground(LIGHTGRAY);
   textcolor(YELLOW);
   clrscr();
   gotoxy(21,1);
   cprintf("Return Book To The Library");
   window(1,2,80,25);
   textcolor(WHITE);
   textbackground(BLUE);
   clrscr();
   FILE *ft;
   ft=fopen("E:\\cpp\\trans.dat","r");
   int i,j,k,id;
   int f1,f2,f3;
   f3=FALSE;
   gotoxy(5,2); 
   cprintf("Enter Book id::");
   gotoxy(9,3); 
   cprintf("/");
   gotoxy(13,3);
   cprintf("/");
   gotoxy(5,3); 
   scanf("%d",&i);
   gotoxy(10,3);  
   scanf("%d",&j);
   gotoxy(14,3);
   scanf("%d",&k);
   f1=chkbook(i,j,k);
   if(f1==FALSE)
   {
     printf("\n\t No Such Book.....");  
     getch();   
     return;
   }
   printf("\n\t Enter Membership id::");
   scanf("%d",&id);
   f2=memcheck(id);
   if(f2==FALSE)
     {
        printf("\n\t No Such Member....."); 
        getch(); 
        return;
     }
   rewind(ft);
   while(fread(&T,sizeof(T),1,ft)==1)
   {
       if(T.mid==id && T.b.bno==i && T.b.gno==j && T.b.no==k && T.reason=='I')
       {  f3=TRUE; break;}
   }
   if(f3==TRUE)
   {
     transac2(id,i,j,k,'R');
   }
   else
   printf("\n\t No Such Transaction In The Records......");
   textcolor(RED);
   cprintf("press any to return");
   getch();
   return;
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -