A
Ashwani
consider A is of type char *A[]
there is this function X which takes variable number of "char * "
arguments, so X can be called like
X (A[0]) or
X(A[0], A[1]) or
X(A[0], A[1], A[3]) and so on
I have to call this function X from different places in the code.
But I want to make the calling of X as generic as possible so I would
like to have a wrapper function or a macro Y such that instead of
calling X( A[1], A[2], A[3]....A[n]) I would call Y(n, A) where n is
the number of valid strings in A, and it in turns calls X.
So at all the places in the code where X is getting called I would use
Y(n, A) as generic call. What would Y be like?
Please note that I cannot control the way X is written, it is a 3rd
party code.
there is this function X which takes variable number of "char * "
arguments, so X can be called like
X (A[0]) or
X(A[0], A[1]) or
X(A[0], A[1], A[3]) and so on
I have to call this function X from different places in the code.
But I want to make the calling of X as generic as possible so I would
like to have a wrapper function or a macro Y such that instead of
calling X( A[1], A[2], A[3]....A[n]) I would call Y(n, A) where n is
the number of valid strings in A, and it in turns calls X.
So at all the places in the code where X is getting called I would use
Y(n, A) as generic call. What would Y be like?
Please note that I cannot control the way X is written, it is a 3rd
party code.