<p>We would like to have user defined formulas in our c++ program.
e.g. The value <em>v = x + ( y - (z - 2)) / 2</em>. Later in the program the user would define x,y and z -> the program should return the result of the calculation. <br />Somewhen later the formula may get changed, so the next time the program should parse the formula and add the  new values. <br/><br/> Any ideas / hints how to do something like this ? <br/><br/> So far I just came to the solution to write a parser to calculate these formulas - maybe any ideas about that ?</p>

Using
Spirit
(for example) to parse (and the 'semantic actions' it provides to construct an expression tree that you can then manipulate, e.g., evaluate) seems like quite a simple solution. You can find a grammar for arithmetic expressions
there
for example, if needed... (it's quite simple to come up with your own).
Note: Spirit is
very
simple to learn, and quite adapted for such tasks.