How do I turn this into a preorder and a postorder traversal? this code only traveses a tree in inorder style
void inorder() { inorderRec(root);