Note pasted straight from my site:
FileEngine [C++, OpenSource]
Purpose:
This will provide developers with the functionality to easily create *.txt files, read them, load them
use quick and easy functions to save/load data within your application - this is fairly restricted at the
moment as you are only working with *.txt files and the main writer function is for strings, but it is
still very useful and portable. I find this particularaly useful for games to save/load certain settings
but is not restricted to games, it is useful for complex applications that use a lot of resources.
Note: it comes with the source, a demo (source and exe) and documentation.
System requirements: N/A
License: freeware/Open source (see license once downloaded) and please donate.
Download
FileEngine [opensource, easy, portable] load/save data!
-
- Posts: 98
- Joined: Fri Oct 03, 2008 1:25 pm
- Location: UK
- Contact:
FileEngine [opensource, easy, portable] load/save data!
-System error
-
- Posts: 98
- Joined: Fri Oct 03, 2008 1:25 pm
- Location: UK
- Contact:
Yes, it uses fstream, but I could not find functions to easily (meaning in a consise manner) to read, write, load etc files and this is just an easy example of implementing that functionality.
The good thing about it for instance it can:
Check a file exists
if so, read it
if not
write it
in this short code:
The good thing about it for instance it can:
Check a file exists
if so, read it
if not
write it
in this short code:
Code: Select all
/*
Purpose:
To demonstrate the basic functionality of creating on loading files
Developed by Craig Fox mailto:greyhatsoftware@hotmail.co.uk
http://GreyHatSoftware.weebly.com
Note: you will need FileEngine.h and FileEngine.cpp included in you proj
*/
#include "FileEngine.h"
int main()
{
cout<<"[Example app to load and write data to a *.txt file]\n";
//Attempt to read data file
FileEngine.readFile();
//check if file was found
if(FileEngine.getWasFileFound() == false)
FileEngine.writeFile("This is a test string for SaveData file!");
cout<<"Finished please close me\n";
cin.get();
return 0;
}
-System error