?? leaveevent.h
字號:
#ifndef _leaveEvent
#define _leaveEvent
#include"event.h"
#include"simulation.h"
#include"customerGroup.h"
#include"storeSimulation.h"
#include<iostream.h>
class leaveEvent:public event//離開事件
{
public:
leaveEvent(unsigned int,customerGroup*);
virtual void processEvent();
private:
customerGroup* group;
};
leaveEvent::leaveEvent(unsigned int time1,customerGroup* gup):group(gup),event(time1)
{
}
void leaveEvent::processEvent()
{
int hours,minuters;
hours=time/60+8;
minuters=time%60;
cout<<hours<<"點"<<minuters<<"分鐘"<<" "<<"有"<<group->groupsize<<"人離去."<<endl;
store.freeChairs+=group->groupsize;
}
#endif
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -