• 博客园logo
  • 会员
  • 众包
  • 新闻
  • 博问
  • 闪存
  • 赞助商
  • HarmonyOS
  • Chat2DB
    • 搜索
      所有博客
    • 搜索
      当前博客
  • 写随笔 我的博客 短消息 简洁模式
    用户头像
    我的博客 我的园子 账号设置 会员中心 简洁模式 ... 退出登录
    注册 登录
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 阅读(148) 评论(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 阅读(173) 评论(0) 推荐(0)
 
类和对象:数据成员之使用默认参数初始化
摘要: 类和对象:数据成员之使用默认参数初始化当创建对象不给定参数时,去掉括号, 如:Date date0;#include using namespace std;class Date{ int day, month, year;public: Date(int... 阅读全文
posted @ 2015-03-27 23:53 Genesis2018 阅读(410) 评论(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 阅读(159) 评论(0) 推荐(0)
 
 

公告


博客园  ©  2004-2025
浙公网安备 33010602011771号 浙ICP备2021040463号-3