#include<iostream>
#include<string>
using namespace std;
//#define aaa L"sssssssssssssssss"
//#define bbb "中国"
#define bbb L"中国" ----->不是说加了之后是宽字符么,怎么打印出来的东西很奇怪嗯
int main()
{
int and;
//cout<<"Hello world"<<"\n";
string mystring("i am ne ");
//mystring = "This is the initial string content";
//mystring("This is a different string content");
cout<<mystring<<"\?"<<endl;
//cout<<aaa<<endl;
cout<<bbb<<endl;
return 0;
}
本文探讨了C++中宽字符的定义及其在字符串操作中的应用,通过实例展示了如何正确使用宽字符字符串,以及与普通字符字符串的区别。
15万+

被折叠的 条评论
为什么被折叠?



