标题:这个程序是哪里错了?
取消只看楼主
小编程员
Rank: 1
来 自:广州
等 级:新手上路
帖 子:14
专家分:0
注 册:2009-7-31
结帖率:75%
已结贴  问题点数:20 回复次数:0 
这个程序是哪里错了?
#include<iostream.h>
int test(int,int,int);
float test(int,int,float=3.5F);
void main()
{test(1,2,3.2);
}
int test(int x,int y,int z)
{cout<<"调用的是第一个函数。"<<endl;
return 1;}
float test(int x,int y,float z)
{cout<<"调用的是第二个函数。"<<endl;
return 1.0;}
这是书上的一道改错题,上面说用float test(int,int,float=3.5F)重载int test(int,int,int)是错的,但我不知道为什么错,望高手给予会答!
搜索更多相关主题的帖子: void 
2009-09-05 12:52



参与讨论请移步原网站贴子:https://bbs.bccn.net/thread-284858-1-1.html




关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.926556 second(s), 8 queries.
Copyright©2004-2025, BCCN.NET, All Rights Reserved