I have a question regarding the priority queue.
priority_queue<obj, comp> stack;
obj& top_object = stack.top();
//Insert some elements to stack, so the top element in stack may be changed
After insertion, does the top_object remain the same or become the new top object in stack?
Thanks
Aucun commentaire:
Enregistrer un commentaire