Is there a cross-platform API key / value in C ++ or a library for C ++?

We want to save some user preferences inside our GUI part of our code. I used Win32 programming exclusively, and the typical way was with the registry settings.

I suppose this should be done with configuration files, but it was interesting if there was a library or cross-platform shell that made it very easy to save a pair of keys and values.

+4
source share
8 answers

The Qt QSettings class handles this:

http://doc.qt.nokia.com/4.6/qsettings.html

+7
source

Boost.PropertyTree supports XML, JSON, INI configuration files.

+7
source

There is also JSON for an easier alternative to XML. Lots of implementations on this page too.

+3
source

Qt 4 has a class for it called QSettings . Looks like what you need.

+2
source

Why not use XML as a configuration file. Then you only need to find a cross-platform XML library that is simpler than IMO. Here is a list of good XML parsing solutions for C ++.

+1
source

The old-school Berkley DB comes to mind.

+1
source

Take a look at the Tokyo office or Built-in InnoDB .

+1
source

In the old days, we used .ini files in windows. Here is a portable version of the ini read / write library
It will work on both Windows and Linux.

+1
source

Source: https://habr.com/ru/post/1309188/


All Articles