Welcome to the new platform of Programmers Heaven! We apologize for the inconvenience caused, if you visited us from a broken link of the previous version. The main reason to move to a new platform is to provide more effective and collaborative experience to you all. Please feel free to experience the new platform and use it's exciting features. Contact us for any issue that you need to get clarified. We are more than happy to help you.
Inserting element into a binary tree-function
Hello, i have a problem with inserting an expression on the tree. I have to do a program that puts logical expressions for example: AND AND OR T F T F. I have no idea how to solve it. My current code performs the functions of calculating the value of trees and printing the expression in the tree. Below is my current code of function insertnode, but it is not working properly. Please help me with the problem. Thanks in advance.
[CODE]void insertnode(tree *&root, char newitem, bool operator)
//the parametr operator valuse:1-operator, 0-operand