66. Customer service system

In order to implement the simulation of the customer service office as required, we could use several helper classes. ticketing_machine is a class that models a very simple machine that issues incremental ticketing numbers, starting with an initial, user-specified seed. customer is a class that represents a customer that enters the store and receives a ticket from the ticketing machine. operator< is overloaded for this class in order to store customers in a priority queue from which they should be taken in the order given by their ticket number. In addition, the logger class from the previous problem is used to print messages to the console:

class ticketing_machine{public: ticketing_machine(int const start) :  ...

Get The Modern C++ Challenge now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.