title: Accessing a copy of of a struct. I get the error: request for member ‘count’ in something not a structure or union
body: <p>For some reason I am not able to access procNames.count. All I need to do is increment the counter. I am not sure why. Anyone sees the problem?</p>
  
  <pre><code>struct config_line {
      char name[MAX_WORD];
      int time;
  };
  
  struct config {
      struct config_line *lines;
      int count;
  };
  
  //global variable
  struct config configData;
  
  // allocate memory to procNames
  procNames = malloc(sizeof(struct config));
  if ( procNames == NULL ) {
      printf("problem allocating memory, for procNames. int procnanny(void)");
      return 0;       
  }
  //local variable
  struct config *procNames;
  
  procNames = &amp;configData;
  // the problem
  procNames.count++;
  </code></pre>