Shifting elements in array C++
<p>Im wondering why my data in 'intFront' does not stay the same. Im shifting the elements in my array left:</p>

<pre><code>void stack::rotate(int nRotations)
{
    for (; nRotations &gt; 0 ;) // Number of Rotations to the left
    {
     intFront = &amp;items[top+1].n; 
        for ( int shiftL = 0; shiftL &lt; count-1; shiftL++ )
        {
            items[shiftL] = items[shiftL+1]; // shift left from the front
     }   
        items[count-1].n = *intFront;
        nRotations--; // decrement=0 will indicate no more rotations left
    }
}
</code></pre>

<p>Whats happening is that the first value or "head" or "front" of the array is put into a varaible 'intFront'. I rotate everything left by the given number of rotations, hoping to just make a simple transfer at the end. Guess not..</p>
