#include using namespace std; const int num=5; class people { public: people(int size=num); ~people(){delete[]p;} int&operator[](int off); const int&operator[](int off)const; int GetSize()const{return size;} class wrong{}; class Zero{}; class Small{}; class Big{}; class Nav{}; private: int *p; int size; }; people::people(int Size):size(Size) { cout<<"调用构造函数\n"; if (Size==0) { throw Zero(); } if (Size<10) { throw Small(); } if (Size>10000) { throw Big(); } if (Size<1) { throw Nav(); } p=new int[size]; for (int i=0;i=0&&off=0&&off