I'm looking for a free, efficient method of storing data so that I can search (easily) for stored data ( by one of two fields ) and save new data
Any ideas?
Printable View
I'm looking for a free, efficient method of storing data so that I can search (easily) for stored data ( by one of two fields ) and save new data
Any ideas?
Huh?
What method wouldn't be free, what do you mean by free?
A binary tree sounds good, provided that it's always the same fields you search for. Then you only need to provide a good sorting function and such and it should work.
std::set is a binary tree.
I don't want to have to pay for a dll / class or include a dll
that's what i meant by free :p
Got any examples?
do you want to save/retrieve the data in files? if so, search for file streams in <fstream>
and for searching/sorting look at data structures such as linked lists, trees, and vectors. they're in the standard library and are fairly straightforward.