I'm writing a windows application which should save and read data like this:
Name Password Birtday Allowed to do... Allowed to do...
Jim 1458 12-12-1995 TRUE FALSE
Jessica 5542 01-06-1981 TRUE TRUE
James 4471 etc...
I found something in the msnd library (http://msdn.microsoft.com/en-us/library/y2ad8t9c.aspx) which seams perfectly suitable, but it looks quite extensive for the job I want to use it for. So are there other (simpler) ways of doing this (is it possible with streams?) and where can I find these?
output everything in a file in a way that you can easily read it back.
A simple format would be one information per line so you can use getline to get it back.
take this simplified pseudocode:
struct S
{
string name;
int password;
};
void save ()
{
open file
for each S
file << name << '\n' << password << '\n';
}
void read ()
{
open file
for each S
getline ( file, name );
getline ( file, temp );
stringstream ( temp ) >> password;
}