example cpp generated code