读书人

请教这个是什么东东

发布时间: 2012-03-01 10:25:47 作者: rapoo

请问这个是什么错误?
在vc编译中有个错误,自己不知道什么意思,请教大家
error C2064: term does not evaluate to a function

[解决办法]
Compiler Error C2064
term does not evaluate to a function

A call was made to a function through an expression that did not evaluate to a function pointer.

This error is probably caused by attempting to call a nonfunction.

The following is an example of this error:

int i, j;
char* p;
void func()
{
j = i(); // error, i is not a function
p(); // error, p doesn 't point to a function
}

意思大概是,你把变量当成函数使用了。
[解决办法]
有时候你就是定义了函数指针,在调用时,如果函数指针赋值,或者调用有问题,也会出现这类情况,比如函数指针指向类的成员函数

读书人网 >VC/MFC

热点推荐