I need a C++ program to implement a heap based priority queue which accepts job ID, priority number and submitter name as inputs. the program should heap sort whenever a new job ID or priority or submitter name is entered. The jobs that have maximum priority should be extracted (along with the job ID, priority number and submitter name) and inserted into ready queue. Can anyone pl help? Its urgent

Recommended Answers

All 2 Replies

There are plenty of freely available priority queue implementations. What is that they do not provide for you?

There are plenty of freely available priority queue implementations.

Including one in the standard library: std::priority_queue. You can always use the STL algorithm heap functions too.

Can anyone pl help?

If you need a priority-queue, use the standard one. If you were asked to implement one, then we can't give you one, because that's not what you need, because what you need is the experience of writing one.

If you need help along your way to implementing your own priority queue, then we can help you along. You need to show that you are making efforts to do this on your own.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.