A simple buffer reading exercise
$ mkdir build
$ cd build
$ cmake ..
$ make
$ ./buffer
It accepts the following commands:
- exit - quit the program
value
:priority
- wherevalue
andpriority
are integers. Insert the value in the queue according to its priority. The queue is a min queue: the lowest the priority number the higher the priority.- print - print the queue
- get - get the first element in the queue