G
grbgooglefan
Hello,
Can you please enlighten me if we can do this in C?
I would like to do something like this:
-----------------------------------------------------------------------------------------------------
typedef struct IOParams {
char *ioString;
long lionum;
double dionum;
float fionum;
int nionum;
} *pIOParams;
char *strFunctionCmd =
"myfunctionCall("iiisd",v_ioparams[0].nionum,v_ioparams[1].nionum,v_ioparam
s[2].nionum,v_ioparams[3].ioString,v_ioparams[4].dionum)";
int retstat = call_function_in_string(strFunctionCmd );
-----------------------------------------------------------------------------------------------------
The vector size could vary, but that is not main issues here.
The problem is that even the variable number arguments function
cannot
be used here because for those functions also we need to have the
number & type of arguments fixed at compile time and the input
arguments passed to them are individual variables.
In the above case, variables are part of a vector having variable
size, so writing call for that also is difficult.
Is there any way to achieve this in C?
Any suggestions please?
Thanks in advance for help
Can you please enlighten me if we can do this in C?
I would like to do something like this:
-----------------------------------------------------------------------------------------------------
typedef struct IOParams {
char *ioString;
long lionum;
double dionum;
float fionum;
int nionum;
} *pIOParams;
char *strFunctionCmd =
"myfunctionCall("iiisd",v_ioparams[0].nionum,v_ioparams[1].nionum,v_ioparam
s[2].nionum,v_ioparams[3].ioString,v_ioparams[4].dionum)";
int retstat = call_function_in_string(strFunctionCmd );
-----------------------------------------------------------------------------------------------------
The vector size could vary, but that is not main issues here.
The problem is that even the variable number arguments function
cannot
be used here because for those functions also we need to have the
number & type of arguments fixed at compile time and the input
arguments passed to them are individual variables.
In the above case, variables are part of a vector having variable
size, so writing call for that also is difficult.
Is there any way to achieve this in C?
Any suggestions please?
Thanks in advance for help