题目:设计一个数组类MyArray,重载【】操作,数组初始化时,对数组的个数进行检查;
情况:1.index < 0时,抛出异常类eNagetive();
2.index = 0时,抛出异常类eZero();
3.index > 1000时,抛出异常类eTooBig();
4.index < 10 && index >0 时,抛出异常类eTooSmall();
#include <iostream>
using namespace std;
class MyArray
{
int m_length;
int *m_data;
public:
MyArray();
MyArray(int length);
int Getlength();
~MyArray();
int &operator [](int index);
class eSize
{
protected: