add function to output as cpp source style