I have the following code:
interface ** rInterfaces[MAX_REACTANS];
_reaction->rInterfaces = (interface **)malloc(MAX_REACTANS * sizeof(interface *));
I am getting an error saying:
error: incompatible types when assigning to type ‘struct interface **[10]’ from type ‘struct interface **’
I don’t know why I am getting this. Any help would be appreciated.
Judging by your
mallocyou want a pointer to a pointer to an interface. Drop[MAX_REACTANS]from your declaration. You can also drop theinterface **cast.