Is it possible to save an entire structure at a time to a file? In the code I’ve attached I am saving the pointer, but not the information stored, how can I do it?


void filesave(void)
{
FILE *fpout;

out=first;

if(out==(struct account *)NULL)
{
puts("There are no records to Save!");
system("pause");
}
else
{
if ((fpout = fopen("test.txt","w")) == NULL)
fprintf (fpout,"%s\n", out);
}

puts("Files Copied!");
system("pause");

fclose(fpout);
}