generate cpp