Hey,
I have this struct
and this is the code thats giving me a bus error
Its a tree of binary letters, I load them in one character at a time. If the word is "STEVE" You create a node S which subExpressionTi llNow has value of "S". Then you create a node T which has a subexpressionti llnow of "ST".
Not working right, no clue whats wrong. Any help is greatly appreciated.
I have this struct
struct node {
char *subExpressionT illNow; // the current subexpression
int isWord; /* To check if this is a valid word to be written into dict.txt,
0 is false, 1 is true*/
struct node *paths[26]; // A subexpression can be followed by any of the 26 characters
};
char *subExpressionT illNow; // the current subexpression
int isWord; /* To check if this is a valid word to be written into dict.txt,
0 is false, 1 is true*/
struct node *paths[26]; // A subexpression can be followed by any of the 26 characters
};
head->paths[letter]->subExpressionT illNow = (char *)malloc(sizeof (head->subExpressionT illNow) + sizeof(char));
head->paths[letter]->subExpressionT illNow = strcat(head->subExpressionT illNow,&c);
head->paths[letter]->subExpressionT illNow = strcat(head->subExpressionT illNow,&c);
Not working right, no clue whats wrong. Any help is greatly appreciated.
Comment