我正在制作一个模拟程序,它在设置参数而不是开始后自动关闭,有什么线索吗?
该程序符合并运行良好,只是不做实际的模拟部分......
void simulate(int timeHours, agent assignAgent[], campaign assignCamp[], int &numOfAgents)
{
const int sim_time_min = timeHours * 60;
if (system("CLS"))
{
system("clear"); //clears window - this method is not recommeneded fix later using win32 api
}
cout << "***Simulation has begun***" << endl << endl;
for(int minuteCounter = 0; minuteCounter <= sim_time_min; minuteCounter++)
{
tickNow(assignAgent, assignCamp, numOfAgents);
//Sleep(1000); //pause for one second
}
}