需要有关基本二叉树编程的帮助 [英] Need help on basic binary tree programming
本文介绍了需要有关基本二叉树编程的帮助的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我已开始我的中期exersize而不是二元树可以帮助我了解基础知识
i已经开始我已经做了以下
我的tree.h文件:
i have started my midterm exersize than is on binary treescan anyone help me on the basics
i have started and i have made the following
on my tree.h file:
展开 | 选择 | Wrap | / span> 行号
推荐答案
麻烦就在这里开始:
Trouble starts right here:
class tree
{
private:
PTR树;
等...
class tree
{
private:
PTR tree;
etc...
私有成员树与您的班级名称相同。大禁忌。编译器认为你已经使用PTR返回来构造一个构造函数。
首先修复此问题。
The private member tree has the same name as your class. Big no-no. The compiler thinks you have delcared a constructor with a return of PTR.
Fix this first.
我修复了同样的错误:(我是卡住了3天
i fixed it same errors:( i am stuck 3 days now
这段代码编译了aand链接但是我没有运行它:
This code compiles aand links but I didn''t run it:
展开 | / span> 选择 | 换行 | 行号
这篇关于需要有关基本二叉树编程的帮助的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文