class NumberArray {
int *nums []; // this line gets error for incomplete type int *[]
int size_;
public:
NumberArray(const int i){nums = new int[i]; size_ = i;}
~NumberArray(){delete [] *nums;}
void set(int i, int n){(*nums)[i] = n;}
int get(int i){return (*nums)[i];}
int min();
int max();
double avg();
};
我意识到这很简单,我很想念它。请赐教。