Using user input as part of the program

Hi, is there a way to use user input as part of the program? Let's say the user inputs a function in the form of y = f(x) and then the program draws the graph for the function. Is there a way to make the program understand that everywhere there is an x it needs to plug in a value and everywhere there is, let's say, sin(), it needs to find the sin?
I think this would need the language to be reflective, which C++ is not, but I'm not sure. Maybe there is another way?
Last edited on
Yes, you "just" need to implement the language or use a library that implement that language.
Not sure I understand what you mean.
Topic archived. No new replies allowed.