The following code when compiled gives the error: "invalid conversion from `void*' to `f*' "
What is wrong with it ?
typedef struct a
{
int* value;
struct a* p;
int r;
}f;
f* m(int* value)
{
f* node = malloc(sizeof(f));
node->value = value;
node->p = NULL;
node->r = 0;
return node;
}