Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8152485
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T15:43:43+00:00 2026-06-06T15:43:43+00:00

I have a fairly large C++ application (on Windows, no other platforms planned), which

  • 0

I have a fairly large C++ application (on Windows, no other platforms planned), which currently stores all settings (even some kind of addresses) in the Windows registry.

Sometimes this is inconvenient, because the users have difficulties changing entries in the registry. I would like to have settings versioned, so settings always match the current code. At the moment we version reg-files, but you are never sure, if all reg-files have been added on the target machines. With C# you can define default values in app.config, but don’t overwrite existing settings. I don’t know, if such a mechanism or library exists for C++.

I would like to have the following “features”:

  • Settings can be versioned
  • Simple update on target machines (can be done by user)
  • Ensure that on update only new settings are added and no existing settings are overwritten with default values
  • Simple change of settings for user
  • Same workflow under Win XP and Win 7

As far as I see it, there are 3 possibilities to store settings on Windows:

  • Registry
  • Ini file
  • XML file

Only one application of our suite uses Qt at the moment, but Boost would be available.

For addresses, we will put them in some kind of XML address book, but for the other settings we are not sure, what’s the best practise.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-06T15:43:45+00:00Added an answer on June 6, 2026 at 3:43 pm

    As comments mention, tree-based key/value structures are a common solution and libraries are easy to find.

    Boost’s property_tree is an excellent choice, as it is well-tested and can easily be exported as XML or JSON

    Regarding your requirements:

    • Settings can be versioned

    Yes! Make “version” a top-level key. Make it easily comparable with other versions.

    You can also categorize your settings into various tree nodes and give each node a version.

    • Simple update on target machines (can be done by user)

    Have your application do that when it runs. See below.

    • Ensure that on update only new settings are added and no existing settings are overwritten with default values
    • Simple change of settings for user
    • Same workflow under Win XP and Win 7

    As settings change from one version to another, usually these changes fall into three categories. New properties are needed, old settings are abandoned, and some settings change their expected format. E.g. “32 Fahrenheit” becomes “0 Celsius”

    When your application initializes:

    • Load the existing configuration file, regardless of its version.
    • If the version does not match what’s current for the application:
      • Create a new blank property tree for the new configuration
      • For each node in the tree, have a set of expected property names, and a function pointer or similar to get this setting if it’s absent in the old file’s tree. If a setting changes its format, give it a new name.
      • Search for each setting in the old tree, copying it if it’s found, and using the result of the supplied function if it’s not.
      • Save your new settings file.

    Your “missing setting” functions can:

    • Return a constant default value.
    • Query the tree for a different setting and convert it (with a default value if the old setting isn’t found either)
    • Ask the user
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a fairly large MVC3 application, of which I have developed a small
We have a fairly large Windows based 1.1 .NET application that we are considering
We have fairly large C++ application which is composed of about 60 projects in
I have a fairly large application that uses WPF for its user interface. I
I am fairly new to Rails and I have never developed a large application.
I have a fairly large SQL statement which has a number of inner joins
We currently use SQL Server 2005 Enterprise for our fairly large application, that has
We have a large application mainly written in SQL Server 7.0, where all database
I Develop Fairly large python application on server side , with all database connect
I have a fairly large application, where my data access strategy has always been

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.