- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I know that the double backslash is needed in C strings to produce the literal , and that the string 'D:'Cwill producethe followingcompiler warning: "The backslash character and following character is not a
valid escape sequence"
But the following does not produce a warning, and the str seems to work fine as an arg in Win32 function calls:
'D'//':'//ACHAR(0)
Which is correct" 'D'//':'//ACHAR(0) or 'D'//':'//ACHAR(0)?
Any comments would be appreciated.
Link Copied
2 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The first is correct, but Windows is fairly tolerant of using two backslashes when one will do. The literal '' is not the same as ''C.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Steve, thanksfor the quick reply.

Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page