I think I got the general idea of how to create and destroy it, but I can not find the way to access each of the objects. Here's how I create it:
CCyIsoPktInfo **arrayOfPointers = new CCyIsoPktInfo*[QueueSize];
for (int i = 0; i < QueueSize; ++i)
{
arrayOfPointers[i] = new CCyIsoPktInfo[PACKETS_PER_TRANSFER];
}
Here's how I destroy it:
for (int i = 0; i < QueueSize; ++i)
{
delete[] arrayOfPointers[i];
}
delete[] arrayOfPointers;
But I need to access each nth_Object.status in the array, given the nth_Pointer to that array. So the general idea would be like this:
for (int nth_Object = 0; nth_Object < PACKETS_PER_TRANSFER; ++nth_Object)
{
var[nth_Object] = (*arrayOfPointers[nth_Pointer]).[nth_Object].status;
}
I am creating and destroying the them properly? How to access the elements?