Automated generation of C code (C++ program)