Tree blah = apple->tree();
Tree blah = apple->tree();
To copy to clipboard, switch view to plain text mode
There is no difference here if tree() returns a reference or value, each time Tree::Tree(const Tree& t) copy constructor is invoked.
If you want to prevent copying, return a pointer or:
Tree& blah = apple->tree();
Tree& blah = apple->tree();
To copy to clipboard, switch view to plain text mode
It would need lots of typedef if there are lots of pointers to different classes.
One per class, not that much
Bookmarks