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

📄 renewb.cpp

📁 图书馆管理系统 包括界面、书籍管理、会员管理等内容
💻 CPP
字号:
#include"liba.h"
void renewb()
{
   struct transaction T;
   int id,i,j,k,n;
   FILE *ft;

   window(1,1,80,2);
   textbackground(LIGHTGRAY);
   clrscr();
   textcolor(YELLOW);
   gotoxy(20,1);
   cprintf("Renew A Book");
   window(1,2,80,25);
   textbackground(BLUE);
   textcolor(WHITE);

   printf("\tPlease input your ID::");
   scanf("%d",&id);
   n=memcheck(id);
   if(n==FALSE)
   {
      printf("\nNo such a member exist!\tPress any key to return.");
      getch();
      return;
   }
   gotoxy(5,4); cprintf("Enter Book id::");
   gotoxy(9,5); cprintf("/");gotoxy(13,5); cprintf("/");
   gotoxy(5,5); scanf("%d",&i);
   gotoxy(10,5); scanf("%d",&j);
   gotoxy(14,5);scanf("%d",&k);
   n=chkbook(i,j,k);
  if(n==FALSE)
   {
     printf("\nNo such a book exist!\tPress any key to return.");
     getch();
     return;
   }

  ft=fopen("E:\\cpp\\trans.dat","r");
  rewind(ft);
  while(fread(&T,sizeof(T),1,ft)==1)
  {
    if(id==T.mid&&i==T.b.gno&&j==T.b.bno&&k==T.b.no)
    {
       transac2(id,i,j,k,'U');
       n=0;
    }
  }
  if(n==0)
  {
     printf("\nYou haven't borrowed such book!\nPress any key to return.");
     getch();
     return;
  }
}

⌨️ 快捷键说明

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