Why can I use a backslash (e.g. “mainvar”) in my strings?
Q: When I type “main\var”, the compiler gives me an error. Help! A: This is a common problem among beginning programmers. The backslash (\) is used as an escape character in the C language. Because of this, you need to modify your string to read like this: “main\\var”. Now, compiler will interpret the \\ as a single backslash, which is what you want. If you want to lean more about escape sequences, look at the information on strings.