Skip to main content
Search type Search syntax
Tags [tag]
Exact "words here"
Author user:1234
user:me (yours)
Score score:3 (3+)
score:0 (none)
Answers answers:3 (3+)
answers:0 (none)
isaccepted:yes
hasaccepted:no
inquestion:1234
Views views:250
Code code:"if (foo != bar)"
Sections title:apples
body:"apples oranges"
URL url:"*.example.com"
Saves in:saves
Status closed:yes
duplicate:no
migrated:no
wiki:no
Types is:question
is:answer
Exclude -[tag]
-apples
For more details on advanced search visit our help page
Results tagged with
Search options questions only not deleted user 7686
1 vote
2 answers
1k views

14 allocs ,13 frees in unload()

all I understand about the unload function is that I should traverse every children node in a node with a loop and check if they point to NULL. if so ,the node will be freed and make it point to NULL.if … so here's the recursive function and the unload function /** *free nodes of dictionary * */ void free_memory(node* current_node) { for(int i = 0 ; i < 27 ; i++) { …
kawegan's user avatar
  • 76
0 votes
1 answer
349 views

unload function failed

I don't know why my unload function doesn't work.i wrote a recursive function to use in the unload function in dictionary.c and wrote the prototype in dictionary.h . i used a trie structure to be the dictionary … Valgrind shows me that the unload function only frees one node. here's my trie struct typedef struct node { bool is_word; struct node* children[27]; } node; node* root …
kawegan's user avatar
  • 76