#ifndef POSTFIX_H #define POSTFIX_H #include "btnodevisitor.h" class postfix: public btNodeVisitor { public: int visit(binTreeNode *p, const int& x) { if (p == 0) { return 0; } p->left->accept(*this, 0); p->right->accept(*this, 0); cout << p->data << " "; return 0; } }; #endif