开发者

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 s开发者_如何学Gotoring: 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!


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.


What you will need is a some form of small database to be distributed with your application. See this SO question for some possible choices (Including SQLite like Bart suggested).

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜