title: Segmentation faults for allocating memory for a binary search tree in C
body: <p>I am trying to implement a binary search tree in C and am getting a segmentation fault when trying to run my code. Essentially in my code I am reading in a line of data from a file, creating a node for it and then inserting that into my binary search tree. I am not even sure if my implementation for this code is correct as I'm getting a segmentation fault when I try to run it. I'm very new to C programming and especially allocating memory so I am aware there are probably a large amount of errors in my code, even in the core structure of the code itself. As such any help with finding the reason behind the segmentation fault or help with the core structure of the code itself would be appreciated.</p>