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

c++ @-quoting

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

serkan sendur
Postaholic
Banned
2,062 posts since Jan 2008
Reputation Points: 854
Solved Threads: 127
 

yeah i guess...

"c:/Docs/Source/a.txt"
cikara21
Posting Whiz
340 posts since Jul 2008
Reputation Points: 47
Solved Threads: 69
 
is there any c++ equivalent of doing that?

Nope :)

Rashakil Fol
Super Senior Demiposter
Team Colleague
2,658 posts since Jun 2005
Reputation Points: 1,135
Solved Threads: 177
 

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).

dewyatt
Newbie Poster
9 posts since Aug 2008
Reputation Points: 33
Solved Threads: 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.

serkan sendur
Postaholic
Banned
2,062 posts since Jan 2008
Reputation Points: 854
Solved Threads: 127
 
No, there isn't. I wish there was.


yeah..really sorry for that..

cikara21
Posting Whiz
340 posts since Jul 2008
Reputation Points: 47
Solved Threads: 69
 

This question has already been solved

Post: Markdown Syntax: Formatting Help
You