| | |
Help for Binary Tree Traversal for infix to postfix conversion
Please support our C++ advertiser: Intel Parallel Studio Home
![]() |
It isn't actually that difficult.
Find the operator with the lowest priority, store it as the root node with the left and right expressions as subnodes.
Repeat for both subnodes.
One thing that complicates it a little is characters that can act as both unary and binary operators (-).
Personally, I find using the stack much easier to complete such a task. Look here for ideas.
Find the operator with the lowest priority, store it as the root node with the left and right expressions as subnodes.
Repeat for both subnodes.
One thing that complicates it a little is characters that can act as both unary and binary operators (-).
Personally, I find using the stack much easier to complete such a task. Look here for ideas.
*Voted best profile in the world*
![]() |
Similar Threads
- binary tree traversal .. (C++)
- Binary Tree Traversal (C)
- C++ complete binary tree using an array. Unexpected end file (C++)
Other Threads in the C++ Forum
- Previous Thread: Don't alter main
- Next Thread: Move up/down in a tree
| Thread Tools | Search this Thread |
api array beginner binary bitmap c++ c/c++ calculator char char* class classes coding compile compiler console conversion count data database delete desktop developer directshow dll download dynamic email encryption error file forms fstream function functions game getline google graph gui homeworkhelper iamthwee ifstream input int integer java lib linkedlist linker linux loop looping loops map math matrix memory multiple news node number numbertoword output parameter pointer problem program programming project proxy python random read recursion recursive reference return rpg sorting string strings struct template templates test text text-file tree unix url vector video visualstudio win32 windows winsock word wordfrequency wxwidgets






