?? main.cpp
字號:
//#include<assert.h>
#include"customerGroup.h"
#include"event.h"
#include"arriveEvent.h"
#include"simulation.h"
#include"storeSimulation.h"
#include"random.h"
#include <stdlib.h>
#include <stdio.h>
#include <time.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);
ran.refresh();
}
store.run();
store.printProfits();
}
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -