You can't. C++ doesn't support reflection.
You could use reflection. It turns strings into real code in runtime. Don´t know how to do this in c++. Java has its own class for this.
Didnt knew that Is there no way to do this?
Oh, i forgot java/c# gets interpreted and c++ is an executeable.