gpt4 book ai didi

.net - 托管 C++ 中的逐字文字? (比如 C#'s @"废话)

转载 作者:可可西里 更新时间:2023-11-01 17:11:12 29 4
gpt4 key购买 nike

有没有办法在托管 C++ 中使用逐字字符串文字?类似于 C# 的

String Docs = @"c:\documents and settings\"

最佳答案

在 C++11 中,有原始字符串文字:

cout<<R"((\"ddd\aa)\n)"<<endl;
cout<<R"delimiter((\"ddd\aa)\n)delimiter"<<endl;

输出是:

(\"ddd\aa)\n
(\"ddd\aa)\n

关于.net - 托管 C++ 中的逐字文字? (比如 C#'s @"废话),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/353464/

29 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com