Our clock is not a real timer in this program, it is an event counter because the teacher is a freaking retard who does things weirdly. The compiler, however, has decided to add a new file on time.h and/or ctime every time I try to compile. I also get a million errors and it comes from stuff I didn't write and neither did my teammates. Why is the compiler adding this to the program randomly, and how do we make it stop?
Code:
int main(int argc, char *argv[]);
{
int clock=1;
int NextTimeF1;
int NextTimeF2;
int SchedPersonF1;
int SchedPersonF2;
int FALSE;
bool floor1=FALSE;
bool floor2=FALSE;
}
{
ElevatorLog open "Elevator_Data", ios::out;
ElevatorLog<<"-ELEVATOR LOG-";
int n=1;
{
int Write_Line (int ElevatorLog, int n);
n++;
}
ofstream ElevatorLog close();
system "PAUSE";
return 0;
}
void Write_Line (ofstream log, int num);
{
log<<num<<"\n";
}
while (clock <101)
{
if (clock %20==0)
{
int NextTimeF1=clock;
int NextTimeF2=clock;
/* NextTimeF1=GeneratePeople(floor1);
if (NextTimeF1!=0)
{
SchedPersonF1 = clock + NextTimeF1;
floor1=TRUE;
}
NextTimeF2=GeneratePeople(floor2);
if (NextTimeF2 !=0)
{
SchedPersonF2=clock +NextTimeF2;
floor2=TRUE;
}*/
}
if (clock ==NextTimeF1)
FloorBusyF1=TRUE;
if (clock ==NextTimeF2)
FloorBusyF2=TRUE;
//if clock == ArrivalTime)
if (arrivaltime==clock)
{
if (ElevatorStatus==FULL)
{
ElevatorStatus=EMPTY;
void Unload (void);
}
else if(dest==1 && floor1==TRUE)
{
Load (floor1, SchedPersonF1);
int SetDestination(int CurrentFloor);
int SetArrivalTime(int NextTimeF1);
}
else if (dest==2 && floor2==TRUE)
{
Load (floor2, SchedPersonF2)
dest SetDestination(dest);
int SetArrivalTime (int NextTimeF2);
}
}
}
}