C二叉树先序建立

最近发现许多学生在使用先序创建二叉树时,总是说自己的程序进入了死循环不能退出,这里说明一下,如果你的程序类似于如下: typedef struct TreeNode{ int data; struct TreeNode *Lchild,*Rchild;}*Tree; void CreateTree(Tree &amp;t){ int ch; cout<<"输入结点数字:"<<endl; cin>>ch; if(ch==0) t=NULL; else { t=(Tree)new TreeNode; t->data=ch; CreateTree(t->Lchild); Cre...
C编程经验 | 2011-05-16 23:22 | 阅读 792 次 | 评论 0 条

智能车

最近在搞智能车,习惯了对象式的编程,对于C语言的位操作突然觉得有点不太适应了,哈哈,不过,还好还好!
默认分类 | 2010-12-05 07:01 | 阅读 610 次 | 评论 0 条

打地鼠游戏

部分主要代码:using System;using System.Collections.Generic;using System.Windows.Forms;namespace WindowsApplication1{ static class Program { /// <summary> /// 应用程序的主入口点。 /// </summary> [STAThread] static void Main() { Application.EnableVisualS...
WinForm | 2010-12-02 12:27 | 阅读 813 次 | 评论 0 条
最新评论