Hi everybody,
I'm looking for a way to let the user enter their own bit of code into the program, and then have the program evaluate that line. As a web designer I know that JavaScript has such a function, which follows this syntax:
That code will assign the value 4 to the variable xyz.Code:var string = "xyz = 1 + 3"; eval(string);
Is there any equivalent way to do this in C++? Ultimately, I want to create a program that lets the user enter a function, and then the program will find the derivative of that function (but, of course, there are many other uses as well).
Any help is appreciated!