char c[1024] = "hello";
cstring modata;
modata = c;
1:strcpy(c,(LPSTR)(LPCTSTR)modata);
2:strcpy(c,modata.GetBuffer(modata.GetLength()));
char向cstring转换:
modata = c;//因为cstring重载了操作符=///c数组必须初始化
char c[1024] = "hello";
cstring modata;
modata = c;
1:strcpy(c,(LPSTR)(LPCTSTR)modata);
2:strcpy(c,modata.GetBuffer(modata.GetLength()));
char向cstring转换:
modata = c;//因为cstring重载了操作符=///c数组必须初始化