954,499 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

Losing My Mind!!! Please Help!!!

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

star320
Newbie Poster
3 posts since Feb 2005
Reputation Points: 10
Solved Threads: 0
 

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.

Chainsaw
Posting Pro in Training
436 posts since Jun 2004
Reputation Points: 36
Solved Threads: 11
 

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 .

Dave Sinkula
long time no c
Team Colleague
5,058 posts since Apr 2004
Reputation Points: 2,780
Solved Threads: 314
 

Thank you for your reply!!!
the build shows this: \par every time I use enter. and on such #include , 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

star320
Newbie Poster
3 posts since Feb 2005
Reputation Points: 10
Solved Threads: 0
 

This article has been dead for over three months

Post: Markdown Syntax: Formatting Help
You