bool Check node pt int pos char word int word pos if pt- NULL printf d

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
bool Check(node *&pt,int pos,char *word)
{
int n=word[pos]-'0';
if(pt->p[n]==NULL)
{
printf("N dont exist!\n");
return false;
}
if(pos<strlen(word)-1)
Check(pt->p[n],pos+1,word);
if (pos==strlen(word)-1)
if (pt->p[n]->p[10]==NULL)
printf("N found!\n");
else
printf("N dont exist!\n");
return true;
};