hi,
I'll be greatful if someone tell me how to declare the preiority queue in c++ and also tell me the syntax that how we can put a node in a preority queue.
Regards
Zain
zainhamza 0 Newbie Poster
Recommended Answers
Jump to PostYou mean like:
#include <queue> #include <iostream> #include <string> int main() { std::queue<std::string> prio_q; std::string node = "value"; prio_q.push(node); return 0; }
Learn about queue here
All 4 Replies
Nick Evan 4,005 Industrious Poster Team Colleague Featured Poster
Narue 5,707 Bad Cop Team Colleague
Nick Evan 4,005 Industrious Poster Team Colleague Featured Poster
Narue 5,707 Bad Cop Team Colleague
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.