SOS 编绎时的警告不解......
用VC做了第一个C++类的程序,还不太明白,编绎时有一个警告:
warning C4551: function call missing argument list
那位了解是什么东东出错了呀,帮帮忙.所有的函数我都声明了呀,写一个单独的头文件里的,函数原型也给出来了呀,可是为什么还有这个警告呢?
问题点数:20、回复次数:3Top
1 楼vcmute(BCare4 H1Rest Good9!)回复于 2005-04-03 11:00:27 得分 0
Compiler Warning (level 1) C4551
function call missing argument list
A function call in Visual C++ must include the open and close parentheses after the function name even if the function takes no parameters.
The following example will generate a C4551 warning:
void function1(){
}
main()
{
function1;
return 0;
}
Top
2 楼vcmute(BCare4 H1Rest Good9!)回复于 2005-04-03 11:01:42 得分 0
不敌括号直接调用
P.S 这种问题请使用MSDNTop
3 楼xuzheng318(忧郁王子)回复于 2005-04-03 11:03:18 得分 20
缺少参数列表的函数调用
函数调用必须在函数名之后包含左括号和右括号,即使该函数未采用任何参数。
示例
// C4551.cpp
// compile with: /W1
void function1()
{
}
main()
{
function1; // C4551
return 0;
}
Top




