But i think the best way to solve this problem is to write a class that overwrite the operator[]. Then you have only to handle with three pointers. the beginning of the array, the end of the array and the position where the virtual beginning of you array is:
pseudocode
Code:
class ShiftArray
{
public:
operator<<(); //shift left. Only set beginning pointer (vbegin) of array
operator>>(); //shift right. Only set begining pointer (vbegin) of array
refernece operator[](int);
private:
arrayPointer *begin, *end, *vbegin;
};
Then, for example ShiftArray:
perator[](0) returns you *vbegin;
cu