I want to declare an array with 3000 elements, ,and then add data to the array in arbitrary order
I have tried the following
CArrayPtrFlat<CResData)* iArray;
iArray = new (ELeave) CArrayPtrFlat<CResData> (3000);
then i tried to use a for loop to add data
*************************************
for(TInt i=0; i<size; i++) // size is supposed to be smaller than 3K
{
id = GetId();
iArray->InsertL(id, data);
}
*************************************
I know that InsertL cannot perform what i want because i cannot insert to a position GREATER than the number of elements in the array