Some code I wrote while reading Programming Principles and Practices using C++