没试过,但你想一下调用一个类的局部函数的形式应该是 (对象).(函数)()的形式,而你的funcList调用 明显缺少对象.
试了一下简单的例子,可运行成功.
class A
{
public:
bool B(){ return true;}
bool C(){ return false; }
};
void main(int argc, char ** argv)
{
A a;
bool (A::*funTest[2])() = {A::B, A::C}, d[2];
d[0] = (a.*funTest[0])();
d[1] = (a.*funTest[1])();
}
从你funcList的定义看,它是
ImageFile的成员,不知道
for(int i=0;i<2*TYPENUM;++i)
if(extName==extList[i])
return (funcList[i/2])(); //此行出错
是不是那个类的成员函数中使用的代码,如果不是,那就错了。
用static_cast