title: Initializing a structure in C gives "declaration of anonymous struct must be a definition" error
body: <p>I declare a structure in my C code known as an edge </p>
  
  <pre><code>struct edge{
  int weight;
  struct node *Node1;
  struct node *Node2;
  };
  </code></pre>
  
  <p>where node is another structure that is defined in my code as well.
  When I attempt to declare an edge in my code I use </p>
  
  <pre><code>struct edge *ab=(struct edge*)malloc(sizeof(struct(edge));
  </code></pre>
  
  <p>This gives me two errors: 1)declaration of anonymous struct must be a definition
  2)type name requires a specifier or qualifier.</p>
  
  <p>What am I doing incorrectly? For further reference my node structure is defined as</p>
  
  <pre><code>struct node{
  char data;
  struct node *parent;
  } ;
  </code></pre>