Convert a String to an rvalue of Assignment Statement

Hello,

What is the most efficient way to convert a string to the rvalue of an assignment statement. I basically have strings that contain numbers and operators for example

1
2
3
string myString = "5 + 7 - 10";
int myInteger = ???  // basically get the equivalent of myInteger = 5 + 7 + 10;


thanks in advance
There is no build in way to do that in C++. You could write a parser to do it.
Topic archived. No new replies allowed.