Thanks, I just copied the loop since its the same and forgot to change it. My next question is one of the things I have to account for is waiting time. Right now the data is hard coded but eventually...
Type: Posts; User: bananasplit
Thanks, I just copied the loop since its the same and forgot to change it. My next question is one of the things I have to account for is waiting time. Right now the data is hard coded but eventually...
Im sorry thats what I meant to type. But my input is still wrong and I am getting a segmentation fault. I dont know why? Any suggestions what to fix. I would like to thank you so much. I definitely...
I see what u mean, so I changed it so the main while loop is while pq and pq2 are not empty that you go through the loop. So then the inner loop is while pq is not empty you go through the while...
thank you, after I tried to implement the second part of the while loop and Im not getting the correct input. What I want is for after the subtraction it is added onto the second queue. The loop...
I had that at first but I changed it because I didnt not how to declare the value on the inside. I declared it as pq.push(events2.pid, events2.priority, events2.service). How would I declare the...
I know that push puts it onto the queue and pop removes it. I tired to use the push but I did not know how I would declare push(); so that it pushes the line of data onto the new queue pq2.
I changed my while loop but Im getting the wrong output. In my while loop for the else statement I want it to perform the subtraction operation and then put that data on the queue pq2. I put a cout...