0

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

4
Contributors
5
Replies
6
Views
8 Years
Discussion Span
Last Post by cikara21
-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).

Votes + Comments
low signal/noise ratio
1

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.

Votes + Comments
you tell em!
This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.