攻城狮凌风

2015年10月13日

运算符++重载

摘要: 运算符重载中,后++(--)需要int参数,前置++(--)则不需要。输入输出重载需定义为友元类型。 #include"iostream"#include"vector"#include"string"using namespace std;class base{ int data... 阅读全文

posted @ 2015-10-13 20:51 攻城狮凌风 阅读(259) 评论(0) 推荐(0) 编辑

每天一道算法题(38)——二叉树的非递归遍历

摘要: #include#include "stack"using namespace std;struct node{ char c; node* left; node *right; bool flag;};void pre(node* head){//非递归前序遍历 stack s; while ... 阅读全文

posted @ 2015-10-13 20:46 攻城狮凌风 阅读(164) 评论(0) 推荐(0) 编辑

导航