MFC 使用ifstream读取文件的时候“<<”不合法什么鬼

if (openFile(&fread, file))
{
    int count1 = 0;
    for (int count = 0; count < ROW; count++){
        fread >> str >> a[0] >> a[1] >> a[2];
        data[count1] = a[0];
        data[count1 + 1] = a[1];
        data[count1 + 2] = a[2];

        count1 += 3;
    }
    error C2678: binary '>>' : no operator defined which takes a left-hand operand of type 'class ifstream' (or there is no acceptable conversion)

这些代码不在MFC中运行是对的

哦哦,我知道了是哪个CString的问题,<<没重载了CString

fread的结构会告诉你,fread需要哪些参数,参数大概要句柄,数组,数组长度等。