A vector of pointers to arrays of pointers to objects. All dynamic.
Here is basically what i have so far...
vector<Example **> exampleObjects; Example ** exampleArray = new Example*[intvalue]; Example *exampleObjectPointer = new Example; exampleObjectPointer->setSomething(); exampleArray = exampleObjectPointer; exampleObjects.push_back(exampleArray);
What i am trying to accomplish there is:
This is all in a for loop, where i am going through and creating objects and putting them into the array and then pushing that array onto the vector. At the moment, whenever i try to view contents of the objects that i pushed onto the vector i get the first of every vector and sometimes a bunch of pointer garbage. Also, whenever i debug this, i dont see it actually create an array of pointers to objects for my "exampleArray" i only see it create one object and point exampleArray to that one object.
Please assist me.
Thanks in advance.
Oh and i cant post specific code. If you can't help with what i have posted then just dont worry about it. No need to come in here and demand more. I will give you as much as i can.