Search code examples
c++serializationstoresearchable

How can I store data in C++ and make the data searchable?


I'm working on an Address Book application in C++. I need to store the data and be able to retrieve it later. I know this requires serialization. I know how to serialize a simple map with a key and value.

I need to know how to store a lot of data, more than just one value. I will be storing: Name, Street Address, City, State, Zip Code, Personal E-mail, Work E-mail, Home Phone, Cellular Phone, Work Phone, Pager, Facebook, and Twitter. I would like to be able to search for any of these values in order to find a contact.

How can I go about storing all of this? Any help is greatly appreciated!


Solution

  • You might want to go with something like SQLite. It will allow you to store your data in an SQL database that you can query for whatever information you want out of it.