THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 18/12/2012 at 04:16, xxxxxxxx wrote:
Your code (please use tags) has no sense.
GeAutoDynamicArray.Insert() returns a Bool to tell if the value is actually inserted. Furthermore for a single loop you assign 3 times the same value to an index in the array.
If you insert the items, you don't need to resize the array; it's only needed if you want to assign directly index values with the operator []. (With a GeAutoDynamicArray this is event not need as it's an auto dynamic array. )
Also please use CINEMA types: Real instead of float, LONG instead of int etc.
Here's what your code could be:
LONG count = 1;
GeAutoDynamicArray<Real> autoDynArray(count);
for(LONG i=0; i<count; i++)
{
autoDynArray.Insert(25, 0);
autoDynArray.Insert(0, 1);
autoDynArray.Insert(12, 2);
}