C++ code samples