[Solved] Realloc not working in my program, any ideas why?
In your function int huffman(node_t *huff, int n) you try to realloc() the huff pointer but in C we pass variables by value so you only receive a copy of the pointer. This means caller retains the original pointer and the realloc() memory is lost when you return from the function. You need to pass … Read more