C++ various exercises