Hello everyone,
I want to do the following in C Language:
- Program takes 2 arguments by command line arguments: first argument is library name, and second is function name from that library. (I know how to do that)
-The program then includes the library as
Code:
#include <library_name>
and also calls the function which has a function signature as
Code:
double function(double argument)
. What is a way that could do this task? How to get the library and function to work by getting them from argv[]?
- Read all double values from input and apply the function to all the values. E.g: sin(0). (Can do that if I know how to get the function by using argv[])
What I have done is that I tried getting the library include tag as a string and convert it to executable code but apparently it is impossible in C to do such thing.
Any idea will be highly appreciated! Thanks!