2017年4月26日
摘要: 1.掘金 https://juejin.im/collections/recommended 2.简书 http://www.jianshu.com/ 阅读全文
posted @ 2017-04-26 09:29 人生一世,草木一秋。 阅读(138) 评论(0) 推荐(0) 编辑
  2017年4月25日
摘要: explicit: 防止隐式转换使用。 隐式转换:不同类型的变量可以互相转换,如将一个整形数值赋值给一个类,ClassXX lei = 4; C++中, 一个参数的构造函数(或者除了第一个参数外其余参数都有默认值的多参构造函数), 承担了两个角色。 1 是个构造器 ,2 是个默认且隐含的类型转换操作 阅读全文
posted @ 2017-04-25 16:45 人生一世,草木一秋。 阅读(210) 评论(0) 推荐(0) 编辑
摘要: 1. 构造函数执行分为两个阶段: a.初始化阶段(初始化) 初始化阶段具体指的是用构造函数初始化列表方式来初始化类中的数据成员。 ClassXX:val(a),key(b){}; b.普通计算阶段(赋值) 给类中的数据成员重新赋值,会覆盖初始化阶段数据成员的值。 ClassXX{val = a,ke 阅读全文
posted @ 2017-04-25 15:50 人生一世,草木一秋。 阅读(6640) 评论(0) 推荐(0) 编辑
摘要: 一、类MyClass 二、主函数调用 三、结果 阅读全文
posted @ 2017-04-25 10:44 人生一世,草木一秋。 阅读(476) 评论(0) 推荐(0) 编辑
  2017年4月18日
摘要: 入门博客:http://www.cnblogs.com/qinfengxiaoyue/category/451679.html 消息机制:http://www.cnblogs.com/qinfengxiaoyue/archive/2013/02/12/2910614.html 阅读全文
posted @ 2017-04-18 10:16 人生一世,草木一秋。 阅读(144) 评论(0) 推荐(0) 编辑
  2017年4月14日
摘要: 1.使用环境DevC++ a.建立C++工程,并添加.\JsonCPP\jsoncpp-master\jsoncpp-master\src\lib_json中源文件到工程中。 b.添加头文件路径 2.使用实例 a.主函数 1 #include <iostream> 2 #include <json/ 阅读全文
posted @ 2017-04-14 11:17 人生一世,草木一秋。 阅读(325) 评论(0) 推荐(0) 编辑
  2017年4月12日
摘要: 1.git简介 http://blog.jobbole.com/25775/ https://juejin.im/entry/57f25b760e3dd9005792301c 2.git和github https://github.com/livoras/blog/issues/7 阅读全文
posted @ 2017-04-12 17:10 人生一世,草木一秋。 阅读(107) 评论(0) 推荐(0) 编辑
  2016年9月14日
摘要: 1.将map转化为vector类型 2.使用sort函数对vector进行排序,写出compare比较器函数 3.比较器中指明按照第几个元素来排序 1 #include <iostream> 2 #include <map> 3 #include <algorithm> 4 #include <ve 阅读全文
posted @ 2016-09-14 09:23 人生一世,草木一秋。 阅读(136) 评论(0) 推荐(0) 编辑
  2016年9月8日
摘要: 1.string.find函数 2. 取子串 阅读全文
posted @ 2016-09-08 10:02 人生一世,草木一秋。 阅读(3357) 评论(0) 推荐(0) 编辑
摘要: http://www.cnblogs.com/wanghao111/archive/2009/09/05/1560822.html 1 #include <iostream> 2 #include <string> 3 using namespace std; 4 5 6 /* run this p 阅读全文
posted @ 2016-09-08 09:53 人生一世,草木一秋。 阅读(20) 评论(0) 推荐(0) 编辑