Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Dynamic Array of Arrays

Status
Not open for further replies.

HoMyGod

Programmer
Jul 17, 2000
59
CH
Hi,

I want to create a com.objectspace.jgl.Array that countains several com.objectspace.jgl.Array. The problem is that the count of the content is variable.

How can I add info in the arrays of my array? (heu heu!)

I would like something like :

while(i<size)
{
myArray.at(i).add(aString);
}

What is the declaration of myArray??

Thanks a lot
H.
 
to be more precise, I have the following :

com.objectspace.jgl.Array defArray= new com.objectspace.jgl.Array();

com.objectspace.jgl.Array tempArray = new com.objectspace.jgl.Array(size, defArray);

((com.objectspace.jgl.Array)tempArray.at(0)).add(&quot;testPosition0&quot;);
((com.objectspace.jgl.Array)tempArray.at(1)).add(&quot;testPosition1&quot;);

But I realize that the result of the opération is :

Array(Array(testPosition0, testPosition1),Array(testPosition0, testPosition1))

instead of :

Array(Array(testPosition0),Array(testPosition1))

Does anybody understand me...?

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top