vector<Process> scheduled = scheduleProcesses(processes);
for (unsigned int i = 0; i < scheduled.size(); i++) {
cout << scheduled[i].getStartTime() << " - ";
cout << (scheduled[i].getStartTime() + scheduled[i].getDuration()) << endl;
}
}
int scheduleProcesses(vector<Process> processes)
{
int minIndex = 0;
for (unsigned int i = 1; i < processes.size(); i++)
{
if (processes[i].getRequiredEndTime() < processes[minIndex].getRequiredEndTime())
{
minIndex = i;
}
}
return minIndex;
}
i'm not sure what i need to do with this. i'm completely lost
oki so basically the program has to return a list of processes that can be completed within the time frame. each process has a time is has to be completed by. however i have no idea on how to find out this time, or even how to find out the end required time.
if it will help i will give you the whole question just let me know