You should provide a
pointer to (that is the
address of)
bstnode
object as (the only) argument to
set_right
method (while you are passing the object itself), change from
Quote:
node.set_right(node2);
to
node.set_right(&node2);
Please note:
Quote:
//declare a bstnode
bstnode(node2);
is not a valid
C++
variable declaration, change to
bstnode node2;