rstatus.cpp
来自「Hotel Management System in c++」· C++ 代码 · 共 38 行
CPP
38 行
#include<stdio.h>
#include<conio.h>
void rstatus()
{
int no;
CUST c;
FILE *cust;
clrscr();
panel();
statusbar("Room Information ");
cust=fopen("c:\\hotel\\database\\checkin.dat","rb");
gotoxy(6,6);
printf("Enter the Room No. :-> ");
scanf("%d",&no);
while(fread(&c,sizeof(c),1,cust)==1)
{
if(c.rno==no)
{
gotoxy(6,8);
printf("Customer Name :-> %s ",c.name);
gotoxy(6,10);
printf("Customer ID :-> %s ",c.cid);
gotoxy(6,12);
printf("Check in Date :-> %d-%d-%d ",c.cin.da_day,c.cin.da_mon,c.cin.da_year);
gotoxy(6,14);
printf("Expected Check out Date :-> %d-%d-%d",c.cout.da_day,c.cout.da_mon,c.cout.da_year);
statusbar("Press Any Key to Return ... ");
getch();
return;
}
}
statusbar("Either Room No. Not Found or Room Is Not Reserved ...");
getch();
statusbar(" ");
return;
}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?