I just try output C\C++ in LaTeX as following below:
\textit{C\backslashC\+\+}
But im getting this issue:
! Undefined control sequence.
<argument> C\backslashC
\+\+
l.141 ... \textit{C\backslashC\+\+}
I just try output C\C++ in LaTeX as following below:
\textit{C\backslashC\+\+}
But im getting this issue:
! Undefined control sequence.
<argument> C\backslashC
\+\+
l.141 ... \textit{C\backslashC\+\+}
\documentclass[preview,border=12pt]{standalone}% change it back to your own document class
\begin{document}
I love \texttt{C/C++} but not \texttt{C\char`\\ C++}.
\end{document}

\texttt, use this: \char\\ (and better yet, put an open quote before the double backslash, but that's real hard to show as a literal in this markdown environment).
– barbara beeton
Nov 26 '13 at 03:18
\char`\\ (backtick backtick slash char backtick slash slash backtick backtick) is possible as a markdown.
– kiss my armpit
Nov 26 '13 at 03:32
The error message says that \backslashC is undefined. You need to put something between the command and the C so LateX can see you want \backslash followed by a C. You can use a space (ignored after a command name) or a brace group: \backslash{}C. Once that error is past, you will get several more errors: \backslash is a mathmode command, and \+ is undefined. What you want is something like \textit{C$\backslash$C++}, but the spacing is all wrong. Also, one usually uses a forward slash in combinations like this. Here are two possibilities, one using a backslash (with the spacing improved) and one with a forward slash:
\textit{C$\,\backslash\!$C++}
\textit{C/C++}
Combining Donut E. Knot's answer with Prettiest way to typeset “C++” (cplusplus)? gives the following answer:
\documentclass[preview,border=12pt]{standalone}% change it back to your own document class
\newcommand{\CC}{C\nolinebreak\hspace{-.05em}\raisebox{.4ex}{\tiny\bf +}\nolinebreak\hspace{-.10em}\raisebox{.4ex}{\tiny\bf +}}
\begin{document}
I love \texttt{C/\CC} but not \texttt{C\char`\ \CC}.
\end{document}

Via The Endevor
I have no idea why the original posters code does not work.
\backslashC is undefined control sequence as the error message aptly says :)
– خالد حسني
Nov 26 '13 at 05:52