Please help... the problem... I run my programs, regardless of what I do seems I get the error C2017 continuous: the other errors at least I am given a "hint" to what to do: but this error constant! Listed as Illegal escape sequence. My errors are generally about 4-5 logic or syntax... this one is every line!!! I don't understand the comment line regarding this error and no matter what I get /par on the end of every line. Should I put /n to denote newline???? Really confused!
thank you, star

Recommended Answers

All 3 Replies

An escape sequence is something like '\n' for newline or '\t' for tab. An 'illegal' escape sequence is one that the compiler has no idea what to do with, like '\k' or something. That can show up if you have, say, a file name in a string and you forget to double escape the slash:

"C:\Chainsaw\Kelp" // wrong
"C:\\Chainsaw\\Kelp" // right

If this doesn't explain it, please post a sample of the code getting the errors.

That can show up if you have, say, a file name in a string and you forget to double escape the slash:

"C:\Chainsaw\Kelp" // wrong
"C:\\Chainsaw\\Kelp" // right

Or use forward slashes.

Thank you for your reply!!!
the build shows this: \par every time I use enter. and on such #include <iostream>, also everytime I tab \tab for every line.
I code:
using std::cout;
it will give me this:
using std::cout;\par

I am new to C-C++. I actually have total 27 errors.... 23 of them is this same C2017 illegal escape issue!

Thank you for your assistance.
star

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.