title: How to reshape a flat array into a 2d in C?
body: <p>I have an array with x * x elements defined as a pointer.</p>
  
  <p>I wanted to do something like this:</p>
  
  <pre><code>void func(const unsigned int x, const int *flat_array)
  {
      const int (*reshaped)[x] = flat_array;
      ...
  }
  </code></pre>
  
  <p>but how?</p>