C/C++ sample code