# C++ operators ^=, <<=, >>= misinterpreted

I write a list of C/C++ operators of the following form : `\texttt{operator+=}, \texttt{operator-=}, \texttt{operator*=}...`

The problem is that `\texttt{operator\^=}, \texttt{operator>>=}, \texttt{operator<<=}` are interpreted by latex and are not rendered as the other ones.

How to solve this problem ?

-

You can use `\verb|operator^=|` to print text verbatim.

Or with the `listings` package you can use `\lstinline|^=|` to set verbatim text.

If you do this a lot, you can use the command `\lstMakeShortInline|` to allow you to just type `|^=|` to set these things. You need to pick a character that won't appear inside your verbatim text. That is, you couldn't do `\lstMakeShortInline*` if you had verbatim text that included the `*` character.

-

Try to use `\verb` or escape it like `\texttt{operator\^{}=}`.

-