请教一个struct的问题
我定义了一个struct.
typedef struct{
int a;
int b;
char *info;
}Mystruct;
void fun()
{
char buff[128];
memset(buff,0,128);
Mystruct *pData=(Mystruct *)buff;
pData->a=1;
pData->b=2;
memcpy(pData->info,(char *)"aaaaa",5);
CString str;
str.Format("%s",&(pData->info));
AfxMessageBox(str);
}
为什么在执行
str.Format("%s",&(pData->info));
时会出错呢?