title: Dynamically allocate a struct array
body: <p>Lets pretend I have a struct like this..</p>
  <pre><code>typedef struct _my_struct {
      int a;
      int b;
  } my_struct;
  </code></pre>
  <p>Now if I did something like this..</p>
  <pre><code>my_struct data[20];
  </code></pre>
  <p>Would give me an array of 20 structs which I can access by doing..</p>
  <pre><code>data[0].a = 5;
  data[5].b = 10;
  etc..
  </code></pre>
  <p>However, what if I don't know the number that I need at compile time? So then I do something like..</p>
  <pre><code>my_struct *data = malloc(sizeof(my_struct) * 20);
  </code></pre>
  <p>The issue is now I don't know how to reference each struct in this buffer of memory.</p>