摘要: void traverse(pBitree root){ queueT; T.push(root); while (!T.empty()) { printf("%c", T.front()->data); if (T.front()->lchild!=NULL) T.push(T.front(... 阅读全文
posted @ 2015-11-14 11:24 式微胡不归 阅读(148) 评论(0) 推荐(0) 编辑
摘要: #define _CRT_SECURE_NO_WARNINGS#include#include#includeusing namespace std;typedef struct tree{ char data; tree *lchild; tree *rchild;}Bitree, *pBitre... 阅读全文
posted @ 2015-11-14 09:59 式微胡不归 阅读(519) 评论(0) 推荐(0) 编辑
摘要: #includevoid turn(int *&p)//加一个取地址符号,不然此指针非彼指针{ if(*p!=5) { *p+=1; turn(p); }}int main(){ int a=0; int *p=&a; turn(p); printf("%d",*p);//传入的p是一个指针 r... 阅读全文
posted @ 2015-11-14 09:54 式微胡不归 阅读(167) 评论(0) 推荐(0) 编辑