Generating cpp code