|
马上注册,结交更多好友,享用更多功能^_^
您需要 登录 才可以下载或查看,没有账号?立即注册
x
设一个函数process,在调用它的时候,每次实现不同的功能。(有点类似多态)输入a和b两个数,第一次调用process时找出a和b中大者,第二次找出其中小者,第三次求a与b之和。按小甲鱼讲的程序怎么老有问题
Compiling...
1.cpp
D:\Dev C++\MSDev98\MyProjects\add\1.cpp(23) : error C2664: 'process' : cannot convert parameter 3 from 'int (int,int)' to 'int (__cdecl *)(void)'
None of the functions with this name in scope match the target type
D:\Dev C++\MSDev98\MyProjects\add\1.cpp(26) : error C2664: 'process' : cannot convert parameter 3 from 'int (int,int)' to 'int (__cdecl *)(void)'
None of the functions with this name in scope match the target type
D:\Dev C++\MSDev98\MyProjects\add\1.cpp(29) : error C2664: 'process' : cannot convert parameter 3 from 'int (int,int)' to 'int (__cdecl *)(void)'
None of the functions with this name in scope match the target type
D:\Dev C++\MSDev98\MyProjects\add\1.cpp(76) : error C2197: 'int (__cdecl *)(void)' : too many actual parameters
Error executing cl.exe.
1.obj - 4 error(s), 0 warning(s)
怎么改啊 |
|