LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Programming (https://www.linuxquestions.org/questions/programming-9/)
-   -   how to find datatype of i in func(void *i,...) (https://www.linuxquestions.org/questions/programming-9/how-to-find-datatype-of-i-in-func-void-%2Ai-299555/)

kapsikum 03-09-2005 08:45 AM

how to find datatype of formal parameter in func(void *i,...)
 
hi,
can any body plz tell me how to determine , with what data type the
argument 1 i.e . 'argument' was called in function foo()
the declaration goes here:

void * foo(void *argument, size_t i);


kapsikim

itsme86 03-09-2005 09:39 AM

You can't. You'll need to do something like pass another type parameter to the function and then do an if/else or switch on that type parameter.

kapsikum 03-09-2005 10:07 AM

OK thanx, itsme86


All times are GMT -5. The time now is 07:33 AM.