Testing c++ code