Simple question about classes

Hi!

I have almost no experience in working with C++ classes, so this one should be easy to answer.

If btree is a class of binary trees, btree::leftson() is a method returning the left branch (also a binary tree), and btree::display() is a procedure for outputing the tree, would (btree::leftson())::display() or (leftson())::display() work if I want to describe the display() method recursively?

If it won't be compiled, how else can I make it output the left branch?

Thanks ahead!
Assuming btree is an instance of a binary tree and leftson() returns a pointer, it would be:
btree.leftson()->display();
Topic archived. No new replies allowed.