cout中的"uR"是什么意思?
What does "uR" mean in cout?
在下面的C++代码中,uR
是什么意思?
#include <iostream>
using namespace std;
int main() {
cout << uR"(Hello, world!)" << '\n';
return 0;
}
就在这里,现在打印
0x55ad7e90b986
根据 this page ,R
表示原始字符串,而 u
表示它是用 UTF-16 编码的。两者可以结合。
UTF16 编码的字符串。看到这美丽的MSDN article
在下面的C++代码中,uR
是什么意思?
#include <iostream>
using namespace std;
int main() {
cout << uR"(Hello, world!)" << '\n';
return 0;
}
就在这里,现在打印
0x55ad7e90b986
根据 this page ,R
表示原始字符串,而 u
表示它是用 UTF-16 编码的。两者可以结合。
UTF16 编码的字符串。看到这美丽的MSDN article