#include <iostream>
using namespace std ;
void say_hello(void)
{
cout << "this is hello" << endl ;
}
//数据类型不同的重载
void say_hello(int a = 100)
{
cout << "this is hotdog" << endl ;
}
int say_hello(double a )
{
cout << "this is hotpig:" << a << endl ;
}
//参数个数不同的重载
int say_hello(int a, int b, int c)
{
cout << "a+b+c = " << a+b+c << endl ;
}
int main(void)
{
say_hello(100);
say_hello(11.11);
say_hello(1 , 2 , 3);
return 0 ;
}</span>
this is hotdog
this is hotpig:11.11
a+b+c = 6
机械节能产品生产企业官网模板...
大气智能家居家具装修装饰类企业通用网站模板...
礼品公司网站模板
宽屏简约大气婚纱摄影影楼模板...
蓝白WAP手机综合医院类整站源码(独立后台)...苏ICP备2024110244号-2 苏公网安备32050702011978号 增值电信业务经营许可证编号:苏B2-20251499 | Copyright 2018 - 2025 源码网商城 (www.ymwmall.com) 版权所有