C/C++ code snippets