my question is the following: supposing I have a program, written in C++, which takes a function and gives its integral. In this program I write the function manually, in the source code, and I change its signature every time I want to integrate another function. If now I want to initialize this function in input (for example giving a string), in order to directly initialize it at compiling time, how could I do?
I would be interested in having something like this:
$ ./program
$ Give me the function name: x+3y+4
and now the function is initialized with:
int func() { return x+3y+4; }