Do I have to start from beginning?
Posted
by Knowing me knowing you
on Stack Overflow
See other posts from Stack Overflow
or by Knowing me knowing you
Published on 2010-05-20T10:24:56Z
Indexed on
2010/05/20
10:40 UTC
Read the original article
Hit count: 138
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.
© Stack Overflow or respective owner