C++ basics code