title: array flipping with pointers
body: <pre><code>int* m = new int [d1*d2]; 
  
  
     ptr1 = m; 
      ptr2 = m + (d2*(d1-1));
  
       if ( *ptr1 != *ptr2){  
         temp = ptr2;     
         ptr2 = ptr1;     
         ptr1 = temp;
      }
  ptr1 +=d2;
  ptr2 -= d2;
  </code></pre>
  
  <p>In order to do </p>
  
  <p>From</p>
  
  <blockquote>
    <p>4 1</p>
    
    <p>3 7</p>
    
    <p>5 2</p>
  </blockquote>
  
  <p>To</p>
  
  <blockquote>
    <p>5 2</p>
    
    <p>3 7</p>
    
    <p>4 1</p>
  </blockquote>
  
  <p>This is what i've came up with so far which is pretty much nothing.
  I'm having problems with finding what kind of a loop would fit in.</p>