代码如下:
#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;
}
测试结果: