never walk alone:请教高手C++

来源:百度文库 编辑:高校问答 时间:2024/04/28 05:58:14
代码如下#include<iostream.h>

int main()
{
int iterations = 0;
bool continue_loop = true;
while ( continue_loop != false )
{ int a=0;
a=iterations;
iterations=a(a);

cout << "the while loop has executed "
<< iterations << " times\n";

if ( iterations == 5 )
continue_loop = false;
}
return 0;
}
int a(int a){
a++;
return a;}
编译时出现如下错误D:\WINNT\system32\12.cpp(10) : error C2064: term does not evaluate to a function
Error executing cl.exe.是什么原因呀?

using namespace std;
是不是要加上这么一句?我觉得不 可能不需要名空间吧

操作中出错了,而且有个语句不正确