I have a struct defined as:
typedef struct _InstNode{
InstInfo* instinfo;
struct _InstNode *dep1;
struct _InstNode *dep2;
bool is_exit;
bool is_entry;
unsigned inst_latency;
unsigned depth_latency;
} InstNode;
and this is instnode_array :
InstNode *instnode_array;
instnode_array = (InstNode*)malloc(sizeof(InstNode)*numOfInsts);
Now I'm trying to do the following:-
instnode_array[i].dep1 = instnode_array[j];
I'm getting this error:
incompatible types when assigning to type
'struct _InstNode *'
from type'InstNode
{akastruct _InstNode
}'instnode_array[i].dep1 = instnode_array[j];