I am implementing a knowledge tree in c that can read from a file. I am getting a seg fault in my newStr function. I\'m not able to test the rest of my code with this problem. I
"+" operator as string concatenation does not work in c.
If you actually want to copy the a string use strdup(). This function allocates memory and copies the string into it.
strdup()
Don't forget to free the allocated memory when done using it.