Jul 27, 2016 at 1:08pm
I have a class called Shows:
|
Show(const Date& date, const Time& time, int showNumber, string title, string genre);
|
I also have a Template BST <T> class and would like to insert shows into it.
1 2 3 4 5 6
|
struct node
{
T insertItem;
node *left;
node *right;
};
|
Currently, my insert function works in a simple "check if insert item > or < insert item in node"
1 2 3 4
|
insert(const T& insertItem, node *Ptr){
...
if (insertItem < Ptr->insertItem)
}
|
How can I make it so that the BST checks for example,
getShowNumber
when inserting
Show()
into tree?
Last edited on Jul 27, 2016 at 1:08pm