C++ 字符串
string strMsg="Notify";
//cout<<strMsg<<endl;//C++不允许直接将类型为string 输出
strMsg.append("fu");
char strName[20]="fan";//其余的都赋值为'\0';
cout<<strName[5]<<endl;
//int datas[20]={1,2};//整数数组初始化与字符数组初始化不一样,这样会报错
strcat(strName,"fu");
cout<<strName<<endl;
char *pMsg="Notify";
cout<<pMsg<<endl;
int len=strMsg.length();
cout<<len<<endl;
int result;
cin>>result;
return 0;