Character constant ignore

68 Views Asked by At

I need to compare variable value with backslash symbol:

char symbol;
/* assigning a value to
a variable */
if (symbol == '\') {
    // some action
}

But my Visual Studio recognizes it as a character constant. How can I ignore it?

Maybe there is a "r" prefix like in python:

symbol = r'\'

0

There are 0 best solutions below