void CLesEx12_1View::OnFileRead()
{
// TODO: 在此添加命令处理程序代码
FILE *pFile=fopen("1.txt","r");
char ch[100];
memset(ch,0,100);
fread(ch,1,100,pFile);;
CString str(ch);//把数组变量的首地址付给CString的变量;
fclose(pFile);
MessageBox(str);//显示CString变量
}
VS2010中用MessageBox显示数组变量
最新推荐文章于 2024-05-04 10:10:18 发布