C++ homeworks