When you are writing an array. how would you create 3 parallel array? Am I over thinking it and it is just initializing and stating 3 arrays? Or is there something more?
Printable View
When you are writing an array. how would you create 3 parallel array? Am I over thinking it and it is just initializing and stating 3 arrays? Or is there something more?
Why do you want to use 3 parallel arrays? A much better approach is to use a single array of objects with each of the objects holding the 3 types of data for that record.
Thats what my instructions call for. I have to create 3 parallel arrays that call for 1 id information. when the user enters in the id, it should display information from the 2nd (the product) and 3rd (the quantity)
In that case your first post was correct. You just create 3 arrays which must be the same size and then you access them with a common index ie if you want all the data for element 5 then you must access element 5 of each of the arrays.Quote:
Thats what my instructions call for.