First attempt at C++ programming