Something really strange in the parameter list of a member function !

This declaration is in the class definition, and it appears very strange!
1
2
ostream& print( ostream &os = *_current_os,
                    void (BinaryTree<elemType>::*traversal)( ostream& ) const = &BinaryTree<elemType>::inorder ) const;


What does the second parameter mean? Actually, the " *traversal" doesn't exist in the class definition, it occurs all of sudden! Can you explain?
Thank, Folks!
Last edited on
It's a pointer to member function, 'traversal' is the name of the parameter, not a member of BinaryTree.
This may be one of the most complex things in C++ grammar
Oh, I see, thanks ,man!
Topic archived. No new replies allowed.