首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 开发语言 > VC/MFC >

请教这个是什么东东

2012-03-01 
请问这个是什么错误?在vc编译中有个错误,自己不知道什么意思,请教大家errorC2064:termdoesnotevaluatetoaf

请问这个是什么错误?
在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
}

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

热点排行