1、语法错误:for循环的变量格式错误,CFile file这里file是句柄,不是int。2、修改:for(int i=0;i{。。。}这个就是移动拷贝,改为:memcopy(strText,read,f.GetLength());
file,GetLength() 逗号改成.