[Subject Prev][Subject Next][Thread Prev][Thread Next][Subject Index][Thread Index]

Re: pointers to functions

Madhu M. Kurup writes:

> deepak yadav encoded : 
> >hi
> >this mail is with refrence to my previous mail which goes like this
> >
> >>i have few functions say a(), b() ,c() ...
> >>i want to call these functions, each within same statement seperated by comma.
> >>e.g 
> >> ( a() , b() , c() );
> >>the problem is -- i want to vary the number and ordering of these functions within that statement at run time.
> Use an array of function pointers, but define the function with a signature as
> void foo(int n, ...);
> and use ellipses to convert back. And yes, this is an ugly hack, and as pointed out before, ideally you should use C++ with a vector<funcptr * > passed in.
> Cheerio,
> M  
>    Madhu M Kurup /* Nemo Me Impune Lacessit */ madhu@xxxxxxxxxxx

i have to write all functions in same statement seperated by comma. and the
whole statement within brackets (). so passing them into another function
as parameteres is not going to be useful.
lanuguage which i can use is C or C++
i have to do it that way. the API says that.