我知道对于空指针不允许使用指针算术。但是想象一下我有这样的事情: class MyArray { int *arrayBegin; // pointer to the first array item, NULL for an empty array unsigned arraySize; // size of the array, zero for an empty array public: int *begin() const { return arrayBegin; } int *end() const { return arrayBegin + arraySize; } // possible? (arrayBegin …