in C# if you add @ before your string literals the escape sequences are not processed, so :

you can use :

@"c:\Docs\Source\a.txt"  // rather than "c:\\Docs\\Source\\a.txt"

is there any c++ equivalent of doing that?

Thanks

Recommended Answers

All 5 Replies

yeah i guess...

"c:/Docs/Source/a.txt"
commented: nope... -2

is there any c++ equivalent of doing that?

Nope :)

commented: ok.. +1

No, there isn't.
I wish there was.

But like cikara21 pointed out, you can use forward slashes for directory strings, if that's your only concern.
You should really always use forward slashes anyways as they are more cross-platform I believe (Windows can go either way, Linux/Unix usually require forward slashes).

commented: low signal/noise ratio -2

No my question was about not processing escape characters, it was not about file paths. But thanks for the answers, it is also good to know what not to search for.

commented: you tell em! +9

No, there isn't.
I wish there was.

yeah..really sorry for that..

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.