Do I have to start from beginning?
- by Knowing me knowing you
If I have:
std::size_t bagCapacity_ = 10;
std::size_t bagSize = 0;
A** bag = new A*[bagCapacity_];
while (capacity--)
{
bag[capacity] = new A(bagSize++);//**here I'm loading this array from the end is it ok?**
}
And also can I delete those object from starting at the end of the array?
while(capacity--)
{
delete bag[capacity];
}
Question in a code.