Can someone explain how I am to access this array? (image processing program)
<p>I am working on the implementation of functions for an already written image processing program. I am given explanations of functions, but not sure how they are designating pixels of the image.</p>

<p>In this case, I need to <code>flip the image horizontally, i.e., rotates 180 degrees around the vertical axis</code></p>

<p>Is this what makes the "image" i am to flip?</p>

<pre><code>    void Image::createImage(int width_x, int height_y)
{
    width = width_x;
    height = height_y;
    if (pixelData!=NULL)
        freePixelData();
    if (width &lt;= 0 || height &lt;= 0) {
        return;
    }

    pixelData = new Color* [width];  // array of Pixel*
    for (int x = 0; x &lt; width; x++) {
        pixelData[x] = new Color [height];  // this is 2nd dimension of pixelData
    }
}
</code></pre>

<p>I do not know if all the functions I have written are correct.
Also, the <code>Image</code> class calls on a <code>Color</code> class</p>

<p>So to re-ask: what am I "flipping" here?</p>

<p>Prototype for function is: </p>

<pre><code>void flipLeftRight();
</code></pre>

<p>As there is no input into the function, and I am told it modifies pixelData, how do I flip left to right?</p>
