客房管理系统,用C++ 编的。谁有啊?课程设计要用啊 ~!

来源:百度知道 编辑:UC知道 时间:2024/05/30 14:35:26

#include<iostream>
#include<string>
#include<fstream>
#include<cstdlib>
#include<time.h>
using namespace std;
class KF{
public:
string id;
string state;
int level;
string desc;
struct tm local;
}kfs[100];
time_t t;
struct tm locNow;
int main(){
int Sel,SelSub;
int i,cnt=0,cntDay;
string strIn;
while(cout<<"\n\n1.客房列表\n2.增加客房\n3.删除客房\n4.修改客房\n5.查询客房\n6.客房操作\n7.退出\n",cin>>Sel){
switch(Sel){
case 1:
cout<<"\n客房列表:(客房号|客房状态|客房等级|客房描述)\n";
for(i=0;i<cnt;++i)cout<<kfs[i].id<<'|'<<kfs[i].state<<'|'<<kfs[i].level<<'|'<<kfs[i].desc<<endl;
break;
case 2:
cout<<"\n客房号:\n";
cin>>kfs[cnt].id;
cout<<"客房等级:\n";
cin>