createCppModel function

Creates a model