Sample code for C++

The code can be compiled by Borland C++ or VC++.
