I'm trying to write some structures (structures contain only 1 word and 2 pointers) too a text file. My code is only writing 1 word too the text file.
Could someone please tell me how to create this file so that the words are 1 to a line.
Here is my code that is not working properly:
void Order(TreePointer Root)
if(Root != NULL)
if((filePtr = fopen("dict.txt","a+")) == NULL)
printf("File could not be created!\n");
fwrite(Root->Data, sizeof(struct TreeNode),1,filePtr);