Thank You!!!
The problem with the code was that lchild and rchild were such that it wasn't getting to null
and about out of range it won't give error as the values are not there that means its null
I would like to share that I have successfully run the code after rectifying the traversal mistake
BIG THANK YOU TO ALL WHO HELPED !!
Mission accomplished !!!
User Profile
Collapse
-
Thank You!!!
Ok ...so if you want to make a tree out of the array positions I have given then do 2i+1 and 2i+2
For example lets take the hypertension its at array 7 position so now to find out its root you will do (I-1)/2 ie 7-1=6 -> 6/2 = 3 now see array 3 ,...you will find stomach ache ... And see if you don't find the correspondent number like you are searching for that means its not there in the list(ie the node...Leave a comment:
-
Thank you !
I haven't gone through the book structure
I want to implement the tree structure without nodes just using the array positions
In case if you have run the code you would have found that the loop runs infinitely and everytime it asks for symptoms
The thing that I want to end the loop conditionally an I am not able to run thatLeave a comment:
-
Thank You!!!
The compiler is not showing any warning but the loop is running infinitely.
The purpose behind this is the prediction of the disease based on symptom and yes its a binary tree made up using arrays. If you observe the array positions are such that it will form a tree.Leave a comment:
-
Thank You!
What i am doing is to incorporate both of them for the simplicity of the program.
I have found that my loop is not ending properly.. If you could please see that and give your input/rectification about the traversal or the search part.
If you have time..Please try running my code then you can see the error i am facing
Thank You!!Leave a comment:
-
Disease Prediction using Decisional Trees
I have made cancer prediction based on symptoms using decision trees but i am not able to run my code
Please Help ME!! Thanks in Advance!!!
...Code:#include<iostream> using namespace std; #include<conio.h> #include<string.h> struct dectree { char symptom[50]; struct disease { char disea[50]; }dis[20]; }arr[40];Last edited by vmishra1; Oct 19 '14, 04:58 AM. Reason: Putting up the entire code for better understanding
No activity results to display
Show More
Leave a comment: