由网友(久不遇)分享简介:有没有办法在托管C ++使用逐字字符串?类似于C#的字符串文档= @C:\ Documents和Settings \解决方案 在C ++ 11,有原始的字符串:COUT<< R((\DDD \ AA)\ n)的<< ENDL;COUT<< R分隔符((\DDD \ AA)\ n)的...![°](https://p.xsw88.cn/allimgs/daicuo/20230904/6151.png)
有没有办法在托管C ++使用逐字字符串?类似于C#的
字符串文档= @C: Documents和Settings
解决方案
在C ++ 11,有原始的字符串:
COUT<< R((DDD AA) n)的<< ENDL;
COUT<< R分隔符((DDD AA) n)的分隔符<< ENDL;
![°](https://p.xsw88.cn/allimgs/daicuo/20230904/6151.png)
输出为:
(DDD AA)ñ
(DDD AA)ñ
Is there a way to use verbatim String literals in managed C++? Similar to C#'s
String Docs = @"c:documents and settings"
解决方案
in C++11, there is raw string literal:
cout<<R"(("dddaa)n)"<<endl;
cout<<R"delimiter(("dddaa)n)delimiter"<<endl;
output is:
("dddaa)n
("dddaa)n
相关推荐
最新文章