199k views
5 votes
C programming: loading a dictionary into a trie data structure. Why am I segfaulting?

User Delana
by
8.3k points

1 Answer

5 votes
// initialize root code c = fgetc(dictptr); while (c != EOF) { if (c != '\\') { // traverse tree code } else { // finish word code } c = fgetc(dictprt); } // finish word code
hope it helps
User Khayyam
by
7.9k points