If 2 function definitions are:
void func(struct Node *arg){...}
void func2(void *arg){
func(arg);
...
}
but they are called like:
struct Node *node = (char *)malloc(6);
func2(node)
I think node
is implictly casted to void*
and then to struct Node*
, so I don't need to do something like:
func2((void *)node);
or func((struct Node *)arg);
Is my understanding correct?