15,979
社区成员
发帖
与我相关
我的任务
分享
CString str1="张三123456789";
int len=str1.GetLength();
char *pchar=new char[5];
for (int i=0;i <4;i++)
{
pchar[i]=(char)str1[i];
}
pchar[4]='\0';
CString msg;
msg.Format("%s", pchar);
AfxMessageBox(msg);