title: struct has no member named
body: <p>My program contains a structure containing two array members. I've called the structure to a void function within function parameters.</p>
  
  <p>structure definition:</p>
  
  <pre><code>struct caketime
  {
      double baking_time [4]={20,75,40,30};
      double prepare_time[4]={30,40,25,60};
  };
  </code></pre>
  
  <p>The void function:</p>
  
  <pre><code>void prepareorder(struct caketime p) {
  
  int i=0;
      for (i=0;i&lt;LIMIT;i++)
      {
          if(p.prepare_time[i]==25)
              printf("Choclate");
          else if (p.prepare_time[i]==30)
              printf("Sponge Cake");
          else if (p.prepare_time[i]==45)
              printf("Meringue");
          else if (p.baking_time[i]==60)
              printf("Red_velvet");
      }
  }
  </code></pre>
  
  <p>When I compile this program, I get the errors described below:</p>
  
  <pre><code>In function 'prepareorder': error: 'struct caketime' has no member named 'prepare_time'
  error: 'struct caketime' has no member named 'baking_time'
  </code></pre>
  
  <p>What seems to be the problem over here?</p>