摘要: 点击查看代码 #include<iostream> #include<string> using namespace std; //占位参数 //返回值类型 函数名(数据类型){} //目前阶段的占位参数我们还用不到,后面课程中会用到 void func(int a, int){ cout << " 阅读全文
posted @ 2021-08-11 08:58 毋纵年华 阅读(33) 评论(0) 推荐(0)
摘要: 点击查看代码 #include<iostream> #include<string> using namespace std; //函数默认参数 //如果我们自己传入数据,就用自己的数据,如果没有,那么用默认值 //注意事项 //1、如果某个位置已经有了默认参数,那么从这个位置往后,从左到右都必须有 阅读全文
posted @ 2021-08-11 08:43 毋纵年华 阅读(48) 评论(0) 推荐(0)