Advertisement

02.17.2004 at 11:21AM PST, ID: 20888276
[x]
Attachment Details

hierarchy using indexes or pointers

Asked by dmatter in C Programming Language

Tags: hierarchy, index, pointer

I've developed a simple bone hierarchy struture that is used to stiore data for a bone in a skeleton.  The structure is capable of have multiple children.
The data for the skeleton is loaded from a file.

I was wondering whether it's better to link parent to children using indexes or pointers.

If I use indexes then they can be stored in the file as integers and the whole skeleton can be loaded with the 'fread' function.  However if I use pointers then they cannot be loaded in this way and extra code must be added to initialise the child poiners.

I hope I make sense,
any help would be appreciated.

DaveStart Free Trial
 
 
[+][-]02.17.2004 at 11:25AM PST, ID: 10385292

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]02.17.2004 at 11:41AM PST, ID: 10385442

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]02.17.2004 at 11:53AM PST, ID: 10385544

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]02.17.2004 at 01:39PM PST, ID: 10386569

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]02.17.2004 at 02:17PM PST, ID: 10386911

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]02.19.2004 at 01:24AM PST, ID: 10400716

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]02.20.2004 at 12:13AM PST, ID: 10410331

View this solution now by starting your 7-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zone: C Programming Language
Tags: hierarchy, index, pointer
Sign Up Now!
Solution Provided By: beekbeek
Participating Experts: 3
Solution Grade: A
 
 
 
Loading Advertisement...
20080716-EE-VQP-32