function pointer to variable argument function
hi,

how can i define a function pointer type to a function that takes variable 
number(0 or more) of arguments

following does not work..??

////////////////////////////////////////////////////////////////////

/* func ptr to function which takes 0 or more args */ 

typedef void (*func_ptr)(...); 

/* functions that take 0,1 args */

void foo();

void foo1(int);

/* assignment  DOESN'T COMPILE */

func_ptr pfoo = foo;

func_ptr pfoo1 = foo1;

gcc error:

invalid conversion from `void (*)(int)' to `void (*)(...)'

///////////////////////////////////////////////////////////////////

in essence, what i want is a function pointer which is capable of taking any 
number of arguments. 

can somebody help me with this?

indika

       
---------------------------------
Need Mail bonding?
Go to the Yahoo! Mail Q&A for great tips from Yahoo! Answers users.

[Non-text portions of this message have been removed]

Reply via email to