C/C++ code for the prototype