title: Attempt to access elements of a 2d struct array failing
body: <pre><code>    typedef struct{
          unsigned long a;
          unsigned long b;
          unsigned long c;
      } mini_struct;    
  
  
      struct ministruct** build_2Dstruct(unsigned long x, unsigned long y){
          double x_squared = pow(2, x);
          struct ministruct** temp = (mini_struct**)malloc(x*sizeof(mini_struct*));
          for(int i = 0; i &lt; x_squared; i++){
              temp[i] = (mini_struct*)malloc(y*sizeof(mini_struct));
              for(int j = 0; j &lt; y; j++){
                  temp[i][j].a = 0;
                  etc....
              }
          }
          return temp;
      }
  </code></pre>
  <p>In the code above I am trying to create a 2D array of ministructs**, with the whole struct being made out of 2^x ministructs*, and each ministruct* has y amount of ministructs.</p>
  <p>aka:
  x = 2,
  y = 2,</p>
  <pre><code>[[struct, struct], [struct, struct], [struct, struct], [struct, struct]] 
  </code></pre>
  <p>However, for some reason when I try to access the second element or index 1 of the struct inside each struct*, it says there is an error: &quot;expression must be pointer to complete object&quot;.</p>
  <p>I just do not understand why the code is not allowing me to access each individual element of the elements of the array?</p>
  <p>Thanks</p>