Sample code of C++