C++ Sample Code