I don't think you really understand it: what you want is called
Computer Algebra System (CAS). Please see:
http://en.wikipedia.org/wiki/Computer_algebra_system[
^].
At this time, I don't know a CAS library which can be embedded into C++. Besides, I don't think your formulation of the problem is any good. Imaging you got the possibility to perform the symbolic string calculations, but what are you going to do with it? To use it in some sensible way, you would ultimately need to compile it as a C++ expression, but how? C++ is not really a self-compiling system (but I knew some naive people who thought it is, and I would not blame them).
This is not how real CAS systems work. Basically, they are generally based on
Expression Trees:
http://en.wikipedia.org/wiki/Expression_tree[
^].
Now, if you read this, you can get some ideas. If you are going to implement your own CAS library in C++ and offer the reasonable ways to use it, it would be great. This is quite a feasible problem, but it would require
a lot of work.
Good luck,
—SA