which stl is best suited to represent a tree

hi all
i have a tree structure:
root --- node 1 to node 10
in each node --- sub node 1 to sub node 10
in each sub node --- leaf node 1 to leaf node 10

i have to print this in following fashion:

root ---- n1 ---- sn1 ---- l1, l2, l3, ....., l10
             n1 ---- sn2 ---- l1, l2, l3, ....., l10
             .
             .
             n10 ---- sn1 ---- l1, l2, l3, ....., l10
             .
             .
             n10 ---- sn10 etc

which standard template library could be used?
which logic have to be followed?

Probably std::map - which is usually based on a red black tree.

1 Like

could you please give me a sample code