coreml: fix wrong C++ code in documentation (#24403)
### Description
<!-- Describe your changes. -->
Change C++ code so that it is valid
### Motivation and Context
<!-- - Why is this change required? What problem does it solve?
- If it fixes an open issue, please link to the issue here. -->