I am trying to make this queue right now that uses elements in an array to increase the appointment time for a queue. Only problem is I don't really know how to get each individual element from the array to add it to the queue. I thought I could just use the code apptQ.push(apptQ.front + apptList.pop); but that would only work with a stack right? Can anyone give me some pointers? Here is my code, thanks.
#include "stdafx.h"
#include <iostream>
#include <iomanip>
#include <queue>
#include "d_time24.h"
#include "d_except.h"
using namespace std;
int main()
{
const int APPTLISTSIZE = 10;
queue<time24> apptQ;
int apptList[] = {45, 75, 60, 90, 15, 25, 40, 30, 35, 45};
time24 t(10,00); //initial time 10:00 am
apptQ.push(t);//inserts t as the first appointment in the queue
return 0;
}