Click here to Skip to main content
15,888,454 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralOT Pin
CPallini18-Apr-08 0:30
mveCPallini18-Apr-08 0:30 
GeneralRe: OT Pin
George_George18-Apr-08 0:34
George_George18-Apr-08 0:34 
GeneralRe: OT Pin
CPallini18-Apr-08 0:53
mveCPallini18-Apr-08 0:53 
GeneralRe: OT Pin
George_George18-Apr-08 0:59
George_George18-Apr-08 0:59 
GeneralRe: any smarter ways to design this tree structure Pin
Matthew Faithfull18-Apr-08 0:58
Matthew Faithfull18-Apr-08 0:58 
GeneralRe: any smarter ways to design this tree structure Pin
George_George18-Apr-08 1:17
George_George18-Apr-08 1:17 
GeneralRe: any smarter ways to design this tree structure Pin
Matthew Faithfull18-Apr-08 6:42
Matthew Faithfull18-Apr-08 6:42 
GeneralRe: any smarter ways to design this tree structure Pin
George_George18-Apr-08 22:44
George_George18-Apr-08 22:44 
Thanks Matthew,


Your insights give me more ideas. Now I make the algorithm in details and want to let you review and
comment. Sorry, I do not adope 100% of your ideas. Smile | :)

1. Any node can have multiple childs, for example, foo has goo and zoo as two childs;

2. If each child has its special money management system, I will put a special pointer to the money object, or else, it will share the same money source from parent (its money pointer points to the same money object of that of parent);

3. In the money object, it contains the pool of nodes which gets money from the object and how much each node gets from the money object, from total amount of money of the money object, and the consumed money by all the nodes, we can make sure how much remains;

4. When checking/assigning remaining budget for a specific child, traverse from the parent (root) of the tree to the specific child, and check its "money pointer" to see the remaining amount of money.


regards,
George
GeneralRe: any smarter ways to design this tree structure Pin
Matthew Faithfull19-Apr-08 11:41
Matthew Faithfull19-Apr-08 11:41 
GeneralRe: any smarter ways to design this tree structure Pin
George_George19-Apr-08 21:25
George_George19-Apr-08 21:25 
GeneralRe: any smarter ways to design this tree structure Pin
Matthew Faithfull20-Apr-08 5:31
Matthew Faithfull20-Apr-08 5:31 
GeneralRe: any smarter ways to design this tree structure Pin
George_George20-Apr-08 17:34
George_George20-Apr-08 17:34 
GeneralRe: any smarter ways to design this tree structure Pin
Matthew Faithfull21-Apr-08 9:54
Matthew Faithfull21-Apr-08 9:54 
GeneralRe: any smarter ways to design this tree structure Pin
George_George21-Apr-08 22:02
George_George21-Apr-08 22:02 
GeneralRe: any smarter ways to design this tree structure Pin
Maximilien18-Apr-08 1:04
Maximilien18-Apr-08 1:04 
GeneralRe: any smarter ways to design this tree structure Pin
George_George18-Apr-08 1:20
George_George18-Apr-08 1:20 
GeneralRe: any smarter ways to design this tree structure Pin
jhwurmbach18-Apr-08 2:11
jhwurmbach18-Apr-08 2:11 
Questioncan anybody tell me how this code works Pin
philiptabraham17-Apr-08 22:47
philiptabraham17-Apr-08 22:47 
AnswerRe: can anybody tell me how this code works [modified] Pin
CPallini17-Apr-08 22:59
mveCPallini17-Apr-08 22:59 
GeneralRe: can anybody tell me how this code works Pin
David Crow18-Apr-08 3:08
David Crow18-Apr-08 3:08 
GeneralRe: can anybody tell me how this code works Pin
CPallini18-Apr-08 4:12
mveCPallini18-Apr-08 4:12 
GeneralRe: can anybody tell me how this code works Pin
ThatsAlok18-Apr-08 5:51
ThatsAlok18-Apr-08 5:51 
GeneralRe: can anybody tell me how this code works Pin
ThatsAlok18-Apr-08 3:53
ThatsAlok18-Apr-08 3:53 
GeneralRe: can anybody tell me how this code works Pin
CPallini18-Apr-08 4:13
mveCPallini18-Apr-08 4:13 
AnswerRe: can anybody tell me how this code works Pin
Rajesh R Subramanian17-Apr-08 23:01
professionalRajesh R Subramanian17-Apr-08 23:01 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.