Various C++ exercises