Thanks for the tip :)
Type: Posts; User: rpc2005
Thanks for the tip :)
Thanks for ur solution! :)
Thanks for your help :)
sorry, i confussed you. i wanted the t enter in the swap() to be the type t of the a and b arguments. Is it possible to do something like that?
i see, so is this correct?
#define swap(t, a, b) (t temp=a; a=b; b=temp;)
Well, i just know to write a function like this...
#define isBigger(a,b) (((a) > (b))? (a):(b))
But i'm not sure how to do a swap function...
It's not a homework assignment. I just started C programming and i wanted to know how to write functions in macro that can allow any data type that's all.
Hi, could anyone help me please? i'm not sure how to write a swap(t, x, y) macro that interchange the x and y arguments of type t... :confused:
Thanks;
thx for the advise. :)
But how about if the node just hold a pointer to struct from the main program? As void* pointer can point to any data type we want and later when i walk through the...
could try to use isdigit()
Thx guys... i'll try to understand the sample.
And yeah i know i should have a struct like that
but i'm not sure what should i do when i write the add function...
i wanted to pass instances of...
Could anyone help me by giving some sample codes of how to write a generic linked list using Void* pointers? i don' t understand how it works and i'm stucked at my assignment...
:confused: