C++ 原始字符串

原始字符串——C++11新特性,VS2012不支持

原始字符串将"(和)"用作定界符,并使用前缀R标识原始字符串:

cout << R"(Jim "King" Try usese "\n" instead of endl)" << "\n";

输出结果:

Jim "King" Try usese "\n" instead of endl

带括号的原始字符串,可以将"+*(和)+*"作为定界符:

cout << R"+*(Jim "King" Try usese "\n" (instead of endl))+*" << "\n";

输出结果:

Jim "King" Try usese "\n" (instead of endl)

你可能感兴趣的:(C/C++学习笔记,c++,开发语言)