I have a hierarchy of files (files from a CAD program that represent the structure of a physical assembly) that I need to process. For example:
I need to process files C and D before I can process B, then I can process B, E, and F; and finally file A. This is a small example, in actual use it can range from no children to hundreds of children many levels deep.
I tried using an array, but had a difficult time keeping track of parents and if I had hit the last level or not.
Seems like a good time to use a tree structure, but I don't have any experience with them. Any advice on how to set one up and use it? Or an alternative suggestion?
Code:
C:\path\A.prt
C:\path\B.prt
C:\path\C.prt
C:\path\D.prt
C:\path\E.prt
C:\path\F.prt
I tried using an array, but had a difficult time keeping track of parents and if I had hit the last level or not.
Seems like a good time to use a tree structure, but I don't have any experience with them. Any advice on how to set one up and use it? Or an alternative suggestion?