I have seen this single line code priority_queue <int, vector<int>, greater<int> > pq; which inserts integers into the queue and the lowest integer the highest priority.
I want to drive this idea, but instead of using 'int', I want to use a class called
1 2 3 4 5 6
int ticks; // represents how long the job takes to process
so the priority becomes as: the lowest ticks the job has, the highest priority it becomes.
I tried to do this priority_queue <Job, vector<Job>, greater<Job> > pq; but didn't work, and I tried to overload the operator > but I couldn't figure out how to do this.