I am writing a program where whoever has the highest priority gets to go out first. So I am using a priority queue. The code is working fine so far, but when I want to view the elements in the queue, they dont increment. For example, it should say job#1, job#2, job#3,.....So I am I have tried multiple ways to change it up, but I cant seem to make it increment. Also, can someone help me figure out a way I should make it view out job1#Student. The one with the highest priority is the instructor then TA then Student.
The variable m_length that you use appears to have nothing whatsoever to do with the length of anything. Remove it. If you ever need to know the length of the vector m_elements, just ask it; m_elements.size()
The number you're trying to put in there appears to have something to do with jobID. But every job you ever create has the exact same jobID. That makes no sense? Shouldn't every job have a different jobID?
You have a struct called jobPositon. That makes no sense. The position of a job is just its position in the queue. The struct jobPosition shouldn't exist.
I get the feeling that you wrote too much code without testing it, and without coming up with a design first (you really need to know in advance what you're trying to create; the odds of getting it right if you don't know what to do are very bad) and you've lost track of what you're trying to do and now you're trying to fix your code by randomly changing bits of it.
The solution to this is to start testing it properly. At every step, output the complete contents of the queue. Add ONE job to it. Output the whole queue. Add ONE more job. Output the whole queue. When you get that working, you'll be able to start getting more elaborate. Your design is confused and parts of it seem to exist just because when you typed it in, the compiler didn't complain about it.
You create the priority queue, and pass to the consturctor... the jobID of some job, which the constructor uses as a size? That makes no sense. What does a jobID have to do with the size of the queue?
All your problems are coming from your design just making no sense. Stop typing, and work out your design first.