Okay so i made a program to create an 2-dimensional array however everytime i run it, it happens to throw an instance of 'ARRAY ERRRORS'. Im not sure why it has that when my inputs are defintely not array errors or whatever i put in it gives array errors. if anything i wish i could have the made the program show me what type of array errors rather than implicting saying ARRAY ERRORS.
class smartArray
{
public:
smartArray(int s = 5, int v = 0);
~smartArray();
smartArray(const smartArray &other);
smartArray& operator=(const smartArray &other);
int& operator[](int index);
void resize(unsigned int newSize);
unsigned int size();
unsigned int find(int x);
int min() const;
int max() const;
double average();
double stdev();
double var();
double median();
void initialize(int x = 0);
void swap(smartArray &other);
void sort(ARRAY_SORT order = ASCENDING);
void reverse();