2017年1月18日

摘要: #include "iostream" #include #include using namespace std; class Root { private: typedef std::function print_func; print_func F_print; public: void setPrint(print_func fun) { F_print = fu... 阅读全文

posted @ 2017-01-18 17:28 竹雨OvO 阅读(135) 评论(0) 推荐(0)

2016年6月17日

摘要: #include using namespace std; int add_(int a,int b){ return 0; } int Add(int i,bool is=false){ static int num=0; ( is==false &&[]{ num=0; return true; }()); ... 阅读全文

posted @ 2016-06-17 13:45 竹雨OvO 阅读(151) 评论(0) 推荐(0)

2016年6月16日

摘要: 阅读全文

posted @ 2016-06-16 18:27 竹雨OvO 阅读(108) 评论(0) 推荐(1)

摘要: #include using namespace std; //单个节点 struct List{ int data; //数据 List * pNext; //下一个节点 }; //向后追加 void push_back(List *&pRoot,int data){ auto tempNode = new List; tempNode-... 阅读全文

posted @ 2016-06-16 16:03 竹雨OvO 阅读(123) 评论(0) 推荐(0)

摘要: #include using namespace std; //单个孩子 struct BiTree{ int data; //数据 BiTree * left; //左 BiTree * right; //右 }; //插入一个节点 BiTree * insertNode(BiTree * pRoot,int node){ BiTree * ... 阅读全文

posted @ 2016-06-16 13:36 竹雨OvO 阅读(127) 评论(0) 推荐(0)

2016年6月15日

摘要: 1.static和const不能同时修饰类的成员函数(static int getde()const;) 分析:原因在于const会在函数中添加一个隐式参数const this*,而static是没有this指针的,此时static的用法和static就产生了冲突。 其他解释:两者的语意是矛盾的。s 阅读全文

posted @ 2016-06-15 14:09 竹雨OvO 阅读(172) 评论(0) 推荐(0)

点击右上角即可分享
微信分享提示