title: How can I dynamically update the array within a struct?
body: <p>So I have this struct</p>
  
  <pre><code>#define MAX 128
  
  typedef struct this_struct {
  Type items[MAX];
  } *SVar;
  </code></pre>
  
  <p>Lets say we create something like this</p>
  
  <pre><code>SVar first = malloc(sizeof(struct this_struct));
  </code></pre>
  
  <p>Now when I push values into the array and it fills to the MAX which is 128, I need to dynamically create a new array but I don't know how since the array is inside.</p>
  
  <p>Here are my current thoughts on how I want to do it:</p>
  
  <ul>
  <li>Create a new SVar names "second" with second->items[MAX *2]</li>
  <li>free(first)</li>
  </ul>
  
  <p>How can I go about doing this?</p>