c++17(12)-raw string,u8,L

#include <iostream>
#include <cstring> 
using namespace std;


int main(int argc, char **argv)
{
   
    char *str1=R"(\\\\n(*73&^%4)
                2@~!/.,>><<
                !!!)";
   auto str2=L"hello";
   auto str3=u8"世界hello";
   cout<<str1<<endl;
   cout<<str3<<endl;
   wcout<<str2<<endl;
}

R原样输出
L输出wchar
u8输出UTF8

\\\\n(*73&^%4)
                2@~!/.,>><<
                !!!
世界hello
hello

Hit any key to continue...
发布了385 篇原创文章 · 获赞 13 · 访问量 5万+

猜你喜欢

转载自blog.csdn.net/AI_LX/article/details/104435777