使用“”字符创建CString

时间:2017-06-11 11:43:59

标签: c++ mfc

我想为包含“”的用户创建一个字符串。 我这样做的方式如下:

CString fileLink;
fileLink.Format(_T(" some text %s "" text with needed characters "" another %s text "), somevariable1 , somevariable2);

但结果我得到了没有“”的字符串。

提前致谢

1 个答案:

答案 0 :(得分:0)

来自@Exhauzt的解决方案是有效的。 需要使用\"在你的字符串中。

" some text %s \" text with needed characters \" another %s text "
相关问题