June 2017
Intermediate to advanced
532 pages
12h 59m
English
In this section, we will set up a cheap to-do list organizing structure. We do not parse user input in order to keep this program short and concentrate on std::priority_queue. So we're just filling an unordered list of to-do items with priorities and descriptions into a priority queue, and then read them out like from a FIFO queue data structure, but grouped by the priorities of the individual items.
#include <iostream> #include <queue> #include <tuple> #include <string>
Read now
Unlock full access