Reputation: 2315
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.
Upvotes: 0
Views: 136
Reputation: 182639
Judging by your malloc
you want a pointer to a pointer to an interface. Drop [MAX_REACTANS]
from your declaration. You can also drop the interface **
cast.
Upvotes: 3