started of .cpp generation function