wildfire1982 Posted November 27, 2003 Posted November 27, 2003 I will have a fairly resource hungry program which is to be storing data similar to how a database might store data but in a way that can be accessed quickly. So i really need an array of arrays to save space. I have thought of using a 3 dimesional array instead but it would create a bit too much data and an array of arrays should store considerably less. Another reason for using an array of arrays is that i dont know how much data is going to be put into the program each time. So... how do you declare and use one of these. The structure will be something like this although i havent finished thinking it through. overallArray( IngredientsArray(PropertiesArray(1,Infinity))) See what i mean? so there will be one overallArray which stores an infinite number of Ingredients which can also have an infinite number of properties. Cheers folks Quote Chris
wildfire1982 Posted November 27, 2003 Author Posted November 27, 2003 Sorry, just remembered... the ingredients will need an extra dimension to store the name of ingredient as well. Quote Chris
*Experts* mutant Posted November 27, 2003 *Experts* Posted November 27, 2003 If you need to dynamically change the size of your array then look into the ArrayList class. Simply using the Add method of the ArrayList will let you add another one. I don't know if Im getting your whole problem right so correct me if im wrong. Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.