dynamically expanding an array in c++
Hey,
I've got this pointer that I want to point to an array of pointers of length X. This array may get full so I may want to create a new one of length 2 * X and copy all the stuff from the original one into this new one. I'm doing this in C++ and whenever I declare the array...
void* asdf[ X ];
I get an error complaining that X isn't constant. So, I've been trying to work the "const" in there but I still can't get through this one. Thanks,
mj
|