My program deals with the following structs:
which is actually a node in a binary tree.Code:
I want now to save this binary tree to a file as an array and then recover it when the program starts again.
I tried fread() and fwrite(), but the program crashes, probably because these functions doesn't know how to handle string.
Can someone suggest me a way of doing this?