📄 main.~cpp
字号:
#include<assert.h>
#include"customerGroup.h"
#include"event.h"
#include"arriveEvent.h"
#include"simulation.h"
#include"storeSimulation.h"
#include"random.h"
extern storeSimulation store(100);
void iceCreamStoreSimulation();
void main()
{
random ran;
iceCreamStoreSimulation();
}
void iceCreamStoreSimulation()
{
random ran;
for(int time=0;time<120;time+=ran.between(2,5))
{
customerGroup* group=new customerGroup;
assert(group!=0);
event*ae=new arriveEvent(time,group);
assert(ae!=0);
store.scheduleEvent(ae);
}
store.run();
store.printProfits();
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -