Not sure why that seems like a challenge, but it's trivial since 2001. Use a codeblock.
So the question was likely: how to write the word "C++" in your prose (as opposed to writing some C++ code)
Here's the code for it: https://github.com/steven-tey/novel/blob/main/ui/editor/inde...
I've debated between "++" vs "+++", but settled for ++ since it's lesser keystrokes (at the risk of conflicting with more common words/phrases) haha