C++ simple code