Working through the example problems in the book C++ Primer