mkcpp_output_population function

Function for internal use