Go4Expert

Go4Expert (http://www.go4expert.com/)
-   C (http://www.go4expert.com/forums/c/)
-   -   macro (http://www.go4expert.com/forums/macro-t9003/)

answerme 23Feb2008 11:28

macro
 
#define KS(p) ks((void *)&p)

Can anyone explain me what this macro is doing

technosavvy 25Feb2008 10:21

Re: macro
 
i hope u will understand with this example:
ASSUMING: ks (in lower case) is an in built function

Code:

int p = 5;
Now, KS(p) will call the function ks passing the address of variable p and typescasting it to a void *.

answerme 25Feb2008 16:56

Re: macro
 
Thanks
I know why do we use void pointer ,but in real time project what is the use of it .


All times are GMT +5.5. The time now is 21:25.