CString str=_T("你好");
char ch[4];
for(int i=0;i
ch[i]=str.GetAt(i);
}
给你看一小段例子:
char buff[128]="hello";
CString str;
str=buff; //因为CString 的 = 被重载,可以直接赋值
strcpy(buff,str.GetBuffer(128)); //GetBuffer可以拿到CString中字符串所存储的地址。
你再体会一下,应该就简单了。
for(int i=0; i