Emitting backslashes in C++
Posted: Mon Jun 08, 2009 11:44 pm
I am trying to output an RTF file with mixed page orientations. I have been following your example and have run into a problem that I cannot solve. I use the following statement:
rv->AddNL ("\\pgwsxn12240\\pghsxn15840", 1, 0);
What I see in RichViewEdit is "\pgwsxn12240\pghsxn15840" (this has become part of the displayed text) and the output RTF file contains two backslashes in front of each parameter (exactly as the literal string). If I change the double backslash to a single backslash, the RichViewEdit display is the same only without the slashes (they are removed) and the corresponding output to the RTF file is missing all backslashes.
The question is, how do I insert text with backslashes in C++?
rv->AddNL ("\\pgwsxn12240\\pghsxn15840", 1, 0);
What I see in RichViewEdit is "\pgwsxn12240\pghsxn15840" (this has become part of the displayed text) and the output RTF file contains two backslashes in front of each parameter (exactly as the literal string). If I change the double backslash to a single backslash, the RichViewEdit display is the same only without the slashes (they are removed) and the corresponding output to the RTF file is missing all backslashes.
The question is, how do I insert text with backslashes in C++?