I have a Java class that uses more lines similar to the following ones
private static final int PARAM_1 = Integer.valueOf(ResourceBundle.getBundle("solution.filtres").getString("filtre.param1.solution"));
private static final int PARAM_2 = Integer.valueOf(ResourceBundle.getBundle("solution.filtres").getString("filtre.param2.solution"));
and the file filtres.properties
found in solution
folder contains:
filtre.param1.solution=1.5
filtre.param2.solution=6
I know that ResourceBundle
is used for user locale, but it seems that it just assigns values to static members from a specific file.
I want to do something similar in C++. I have found this for C++, but it seems a little strange for what it does; so I am asking:
I would appreciate some code if anyone did some kind of this assignments.
Using Boost and its pthree
and the .xml or .json parser is a better way.