Re: how to build a recursive map ?

From: John Harrison (john_andronicus_at_hotmail.com)
Date: 04/20/04


Date: Tue, 20 Apr 2004 16:35:27 +0100


"jose luis fernandez diaz" <jose_luis_fdez_diaz_news@yahoo.es> wrote in
message news:c2f95fd0.0404200623.77eb425f@posting.google.com...
> Hi,
>
> When I want build a tree I define the structure below:
>
> struct node
> {
> string data;
> node *leaf;
> node *right;
> };
>
>
> I want to define a map where each element is a map. Something similar to:
>
> map<string, map *> m1;
>
>
> Any idea ?
>
> Thanks,
> Jose Luis.

Like this

class Recursive
{
public:
    ...
private:
    map<string, Recursive*> m1;
};

john



Relevant Pages

  • Re: how to build a recursive map ?
    ... > When I want build a tree I define the structure below: ... > I want to define a map where each element is a map. ...
    (comp.lang.cpp)
  • how to build a recursive map ?
    ... When I want build a tree I define the structure below: ... I want to define a map where each element is a map. ...
    (comp.lang.cpp)
  • Re: NEED HELP WITH A PROGRAM....ANYONE PLEASE HELP!
    ... struct Node* left_child; ... if done exit the loop ... add the word to the tree -- a function you write. ... how to display it's content. ...
    (comp.lang.c)
  • Re: nodes
    ...     What am I doing here. ... Well you accessed struct node s as a pointer instead ... how do you traverse the tree to insert, ...
    (comp.lang.c)
  • Re: How to deal with Tree with several branchs?
    ... My program deal with a several level tree with several branchs. ... But I can not search child randomly. ... struct node *sibling; ...
    (comp.programming)