Morning all,
I need to code a structure that looks like this:
Q1 --- X1 --- F1 --- F2 --- F3 --- X2 ---- F1
Q2 -- X2 --- F1
i.e. For every Q (highest level), there can be multiple X's. For every X, there can be multiple F's (lowest level). I want to create this structure and then be able to traverse it. E.g. Q1, X1, F1, then Q1, X1, F2, etc. right through the whole structure. Each Q, X, and F, are purely a string.
I thought about using a multidimensional dynamic array and using Delphi help could probably get this working. However, I'm new to Windows programming (1+ yrs) and want to learn OO. I've written a couple of objects recently, so thought I might try to tackle this as a Q object which has multiple X objects inside it, and then multiple F objects inside the X objects.
I've started reading about collections and trying some sample code, but don't know enough to "create a collection within a collection", or even if that's a correct concept.
Any comments or suggestions? Would a TObjectList be better? Should I just stick to an array?
TIA Dave Jollie (: 09 368 4259
|
- RE: [DUG]: Best methods for representing a 3 dimensional ... Dave . Jollie
- RE: [DUG]: Best methods for representing a 3 dimensi... Leigh Wanstead
- Re: [DUG]: Best methods for representing a 3 dim... Dennis Chuah
- Re: [DUG]: Best methods for representing a 3 dimensi... Dave . Jollie
- Re: [DUG]: Best methods for representing a 3 dim... Neven MacEwan
- Re: [DUG]: Best methods for representing a 3 dim... Phil Middlemiss
- Re: [DUG]: Best methods for representing a 3 dim... Dennis Chuah