title: structure calloc c
body: <p>C99 gcc</p>
  
  <p>I keep getting this error. I have a struct outside main. And inside main I am trying to allocate on the stack using calloc. I can't seem to find out what is wrong.</p>
  
  <p>Thanks for any advice,</p>
  
  <p>error: expected expression before ‘)’ token</p>
  
  <pre><code>/* global */
  struct port_data_t                                                                      
  {                                                                                       
      size_t task_id;                                                                     
      pthread_t *thread_id;                                                               
      size_t start_port;                                                                  
      size_t number_ports;                                                                
  } *port_data;                                                                           
  
  
  /* main function */
  struct port_data_t *port_data = (struct task_data_t*) calloc(4, sizeof(port_data*));
  </code></pre>