EDIT:
Let me rephrase; I know that a better method would be to use:
Code:
vector<MyClass> myInstance;
But I also really don't want to go back through all lines of code and change all of that.
I am working on a program that reads data into this array and the data file will not always be the same size. I want the program to be able to adjust accordingly, without having to recompile. So, is there a way to dynamically allocate an array of MyClass, without knowing the size of the array? Every method I have tried, has called bad_alloc to be thrown.