Question: I need help in C + + with the tree attached. I can't figure out how to test the code for a binary decision tree

I need help in C++ with the tree attached. I can't figure out how to test the code for a binary decision tree in Visual Studio. The code must ask the user for a filename, open and read a file with the provided name, with .txt appended to it. For example, if the user provides the file name tree", the program must open and read the file tree.txt. The file must contain a textual description of a binary decision tree as in the example above. The tree must have at least five question nodes; there is no upper limit.
After reading the file, the program must walk the user through the tree until a decision is reached. The program must use at least one function, which should read the provided file and return a tree. This function must be present in a separate file. The prototype of this
function should be: vector readtree(ifstream &);
The function argument is an input file stream; the function assumes that the file was already opened successfully, so it can start reading from the stream directly. A header file must be provided.
I need help in C + + with the tree attached. I

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!