Text Query Program as described in C++ Primer (Lippman, Lajoie,  Moo)