Hello all;
Having a brain fart here.
I want to check if a char is == to an ' or not.
the statement if(char == ''') does not work bc the compiler sees the second ' as the end and the third as erroneous. Sooo....
how can I test for this condition
Printable View
Hello all;
Having a brain fart here.
I want to check if a char is == to an ' or not.
the statement if(char == ''') does not work bc the compiler sees the second ' as the end and the third as erroneous. Sooo....
how can I test for this condition
Escape sequences.
Use the escape sequence for a single quote ( \' ) inside your quotes.
Code:if (x == '\'')
...
escape with a backslash, e.g. '\''
Use a \
Code:'\''