command line ticket-vendor in C++