I\'ve got a part of my memory that I want to dump to a file. One reason is to save the information somewhere, and another is to read it again when my program restarts.
You can use
size_t fwrite ( const void * ptr, size_t size, size_t count, FILE * stream );
function.
ptr - pointer to you memory segment.
size - size of memory to write.
stream - file you writing to.
Will my "datastructures" survive as "charachters", or do I need to write it in some sort of binary / hexa data-mode? Or is it a stadard way of doing this?
when you open file - use 'b' character in "mode" param