Hi all,
I have a header file "realTreeNode.h" and starts like this;
Code:
#ifndef REALTREENODE_H
#define REALTREENODE_H
#include "keyedItem.h"
#include
using namespace std;
typedef KeyedItem TreeItemType;
const int MAX_DIFF_PAGE_NUMBERS = 50;
typedef void (*FunctionType)(TreeItemType& anItem, TreeItemType pageNumbers[MAX_DIFF_PAGE_NUMBERS]);
class TreeNode // a node in the tree
{
....
};
In addition to this I have another header file "realBST.h" and starts like this;
Code:
#ifndef REALBST_H
#define REALBST_H
#include "realTreeException.h"
#include "realTreeNode.h"
typedef void (*FunctionType)(TreeItemType& anItem, TreeItemType pageNumbers[MAX_DIFF_PAGE_NUMBERS]);
class BinarySearchTree
{
...
};
The thing I want to do here is;
Creating a private BinarySearchTree object ( variable / property ) in TreeNode class.
However, when I add #include "realBST.h"in order to create a private BinarySearchTree member for TreeNode to "realTreeNode.h" file, it gives many irrelavent errors.
How could I solve this problem, any suggestions, any opinions would be helpful.
Best wishes,