How can I know if the Backslash is in my string?

This line bool hasBackslash = (line.find("\\",0) != string::npos); will look for \\ in the code.”

no it won’t. that’s exactly what you need if you want to search for a single backslash.

Leave a Comment