tab.h
来自「宾馆住宿管理系统,包括住宿登记,计费,退房,查看当前空房等功能.」· C头文件 代码 · 共 58 行
H
58 行
// Tab.h: interface for the Tab class.
//
//////////////////////////////////////////////////////////////////////
#if !defined(AFX_TAB_H__8E30C326_9915_467C_A87F_F56F4F3F1D12__INCLUDED_)
#define AFX_TAB_H__8E30C326_9915_467C_A87F_F56F4F3F1D12__INCLUDED_
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
#include<string.h>
#include<iostream.h>
class Tab
{
public:
Tab();
void makeTab(char *pName,float Id,int d,int dp,double prc)
{
strcpy(name,pName);
name[sizeof(name)-1]='\0';
days=d;
doorplate=dp;
ID=Id;
price=prc;
}
virtual void display()
{
cout<<"门牌号:"<<doorplate<<endl;
cout<<"房客姓名:"<<name<<endl;
cout<<"房客身份证: "<<ID<<endl;
cout<<"需要交付金额为: "<<price<<endl;
}
char* tabname()
{
return name;
}
void tabroom(int dp)
{
doorplate=dp;
}
int Rtabroom()
{
return doorplate;
}
virtual ~Tab();
protected:
char name[20];
int doorplate;
int days;
float ID;
double price;
};
#endif // !defined(AFX_TAB_H__8E30C326_9915_467C_A87F_F56F4F3F1D12__INCLUDED_)
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?