Archived

This topic is now archived and is closed to further replies.

hemp

fileformats

Recommended Posts

In C++ create a file handle with the following line

FILE *FFile = NULL;

Then open a file to save into or make a new file to save your settings etc into

FFIle = fopen("Filename","w");

Then write what you want from a buffer (ie struct, array, class etc)

fwrite(&Structure,sizeof(Structure),1,FFile);

Then close the file

fclose(FFile);
-----------------------------------------------------------------
In order to load the file back up

FILE *FFIle = NULL;
FFile = fopen("Filename","r");
fread(&Structure,sizeof(Structure),1,FFile);
fclose(FFIle);

http://kickme.to/BallisticPrograms

Share this post


Link to post
Share on other sites