Samples of C++ code