Not printing correct element
<p>I am passing an object in to my function...and accessing each element stored in a double array of the object...</p>

<p>I can see in the watch window that the element is in there(60.5), it is just printing the old value(1006).???</p>

<pre><code>double MatrixClass::min(MatrixClass* matOb)
        {
            double tempNum = matOb-&gt;dataptr[0 * matOb-&gt;N + 0];//set the value of tempNum to the first element of the matrix object

            for(int i =0;i&lt;((matOb-&gt;M) * (matOb-&gt;N));i++)
            {
                //double value = *matOb-&gt;dataptr + i;
                //cout &lt;&lt; (*matOb-&gt;dataptr+i);
                if((*matOb-&gt;dataptr + i) &lt; tempNum)
                {
                    tempNum = (*matOb-&gt;dataptr + i);
                }//end if
            }
            return tempNum;
        }//end min
</code></pre>

<p>You can see my function above...even printing the value gives the old value(1006)..I can see for sure that the value 60.5 is there, it is just printing the old value before I changed it!</p>
