I am having trouble with a certain implementation.
I have a binarytree class called btree, this classes has all the insert, remove etc function.
I also have another class inheritance called device with smart and power derived class.
I am trying to use the BST in the class so that each time i make a device object it doesnt make a new tree, instead makes inserts in the same tree.
like if i do this from my client.
device a ("TV");
device b ("phone");
device c ("laptop");
this should output
how do i do this?