how to check if chars are equal c++ code example Example: check if equal to \ char or not c++ if (c == '\\') { }