#include #include class Array { private: double *mem; int size; public: Array(int size){ this->size = size; mem = new double[size]; } void resize(int newSize){ double *newMem = new double[newSize]; for (int i=0; i=size){ resize(index+1000); } return mem[index]; } }; int main(int argc, char* argv[]){ Array myMem(10); myMem[10000000] = 3.1415; printf("myMem[10000000] = %f\n",myMem[10000000]); }