会员
周边
众包
新闻
博问
闪存
所有博客
当前博客
我的博客
我的园子
账号设置
简洁模式
...
退出登录
注册
登录
Genesis2018
博客园
|
首页
|
新随笔
|
新文章
|
联系
|
订阅
|
管理
2015年3月27日
函数间的参数传递
摘要: 函数间的参数传递值调用://交换两个变量的值(不成功)#includeusing namespace std;void myswap(int x, int y){ int tmp = x; x = y; y = tmp;}int main(){ ...
阅读全文
posted @ 2015-03-27 23:57 Genesis2018
阅读(142)
评论(0)
推荐(0)
编辑
函数间的参数传递
摘要: 函数间的参数传递值调用://交换两个变量的值(不成功)#includeusing namespace std;void myswap(int x, int y){ int tmp = x; x = y; y = tmp;}int main(){ int a = 2, b = ...
阅读全文
posted @ 2015-03-27 23:56 Genesis2018
阅读(169)
评论(0)
推荐(0)
编辑
类和对象:数据成员之使用默认参数初始化
摘要: 类和对象:数据成员之使用默认参数初始化当创建对象不给定参数时,去掉括号, 如:Date date0;#include using namespace std;class Date{ int day, month, year;public: Date(int...
阅读全文
posted @ 2015-03-27 23:53 Genesis2018
阅读(396)
评论(0)
推荐(0)
编辑
类和对象:数据成员之使用默认参数初始化
摘要: 类和对象:数据成员之使用默认参数初始化当创建对象不给定参数时,去掉括号, 如:Date date0;#include using namespace std;class Date{ int day, month, year;public: Date(int yy = 1949, int ...
阅读全文
posted @ 2015-03-27 23:52 Genesis2018
阅读(154)
评论(0)
推荐(0)
编辑
公告