C++ code example