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