Very simple C++ exercize. Trying to relearn it after a long long time