title: How to pad a pointer array
body: <p>I've applied a Guassian blur to an image now need to take care of the edge pixels. I've decided to pad the initial pixel array to take care of this issue. </p>
  
  <p>How could I pad a pointer array?</p>
  
  <pre><code>int *myArray = 1, 2, 3, 4, 5, 6, 7, 8, 9
  </code></pre>
  
  <p>Which is basically a 2D array of:</p>
  
  <pre><code>1 2 3
  4 5 6
  7 8 9
  </code></pre>
  
  <p>How could I convert this to the following pointer array (1 padding):</p>
  
  <pre><code>0 1 2 3 0
  1 1 2 3 3
  4 4 5 6 6
  7 7 8 9 9
  0 7 8 9 0
  </code></pre>
  
  <p>2 padding:</p>
  
  <pre><code>0 0 1 2 3 0 0
  0 0 1 2 3 0 0
  1 1 1 2 3 3 3
  4 4 4 5 6 6 6
  7 7 7 8 9 9 9
  0 0 7 8 9 0 0
  0 0 7 8 9 0 0
  </code></pre>
  
  <p>And so fourth.</p>