MFC编程,我在Global中申明了一个数组auxitemp[][],在view类的成员函数中调用时报错如下:
error C2065: 'anuxitemp' : undeclared identifier
F:\程序设计b\ScanarithDemo\Draw.cpp(632) : error C2109: subscript requires array or pointer type
F:\程序设计b\ScanarithDemo\Draw.cpp(632) : error C2109: subscript requires array or pointer type
不知是哪儿出错了
error C2065: 'anuxitemp' : undeclared identifier
F:\程序设计b\ScanarithDemo\Draw.cpp(632) : error C2109: subscript requires array or pointer type
F:\程序设计b\ScanarithDemo\Draw.cpp(632) : error C2109: subscript requires array or pointer type
不知是哪儿出错了
比如auxitemp的声明是:int auxitemp[3][4];
那么就应该在view的cpp文件中,include语句的下面加上:extern int auxitemp[3][4];