[C++11]字符串原始字面量
生活随笔
收集整理的這篇文章主要介紹了
[C++11]字符串原始字面量
小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
代碼如下:
#include <iostream> #include <string> using namespace std;int main() {string str1 = R"(D:\hello\world\test.txt)";cout << str1 << endl;string str2 = R"(dsdasasdasasda asdagdfhadagd)";cout << str2 << endl;string str3 = R"hello(D:hello\world\test.txt)hello";cout << str3 << endl;return 0; }測試結果:
總結
以上是生活随笔為你收集整理的[C++11]字符串原始字面量的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 飞书首次发布AI服务框架 CEO谢欣:用
- 下一篇: 游戏改编电影《纸嫁衣:鸳鸯债》备案