u just need to consider the important options. for leaves, you are concerned ONLY with those nodes that do not have any children. anything else is irrelevant.
void leafdisplay(node *p)
{...
Type: Posts; User: syrel
u just need to consider the important options. for leaves, you are concerned ONLY with those nodes that do not have any children. anything else is irrelevant.
void leafdisplay(node *p)
{...
void leafdisplay(node *p)
{
if(p->left !=NULL && p->right !=NULL)
{
leafdisplay(p->left);
leafdisplay(p->right);
}
cout<<p->info<<endl; // this statement will display all nodes...
i got it working with the strcmp(x,y) function, but here is the code i was referring to earlier incase u wanted to see what i was talking about.
void insert(node *&p, char x[15])
{
if...
see, thats what i have been doing but it wont work. other people are telling me to use the <cstring> function strcmp(st1, st2) which will return 0, 1, and -1. if anyone has a better suggestion, i...
i need my program to use greater-than (>) and less-than (<) IF/ELSE statements for char arrays or strings. but so far, it wont work, even though my professor demonstrated it with confidence. i am...
thanx for the hlp, i tried what u suggested and it appears to have worked. but why is the int main important? i've been usig void main all the time. did it make a difference in this case, or is it...
if anyone has time to help me....i am missing something that i cannot see. the value of x is supposed to be transferring to p->info but it does not. i cant figure out why. because of this, the...
230? i'm only in 131...
i hope u have a lab, cuz my school feels it's unnecessary for some odd reason
that worked, thanx jlou :D
:confused: k, this board is my only available "lab" for a univeristy level course, so please help if u can...
i am pretty sure i simply do not understand classes yet, but my stupid assignment is...
k, i have looked through 2 different books and my instructor doesnt have the greatest knack for explaining things.
Can anyone briefly explain the point of using a constructor within a class? Is...
I am trying to whip out a template program, and the compiler yells at me when i try to declare the contents of an array inside the public/private areas of the class:
template <class T>
class...