🎉 Celebrating 25 Years of GameDev.net! 🎉

Not many can claim 25 years on the Internet! Join us in celebrating this milestone. Learn more about our history, and thank you for being a part of our community!

fileformats

Started by
1 comment, last by hemp 22 years, 7 months ago
How do people make fileformats?
Advertisement
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
Send an email to wotsit.org and give it a name. Wait a few weeks, then you can download the specifications for it.

Kneelz

This topic is closed to new replies.

Advertisement