i want to insert two types of value in a proirity q using stl.
the problem is shown in the follwing example:
10 1
100 2
12 4
1000 3
so if i call q.top() then it will be 1000.
now i also want to get the position of 1000 which is 3.
how can i get it.
details information will be helpful.
thanks in advanced.
help needed for priority queue using stl?
Moderator: Board moderators
Use struct and define necessary functions which determines the sorting order of struct type.
For details look into http://www.sgi.com/tech/stl/
For details look into http://www.sgi.com/tech/stl/