Hi everybody,

I'm pretty new to C++ so I don't know if I'm on the right track with the following subject.

I'm making a little application to modify and view some logging information. Every log message has a group, subgroup and level (all integers) associated with it. Because I want to enable the user to select what group, subgroup and level he wants to see, I want to inspect the logfile and see what groups, subgroups and levels are available and store this information in a datastructure. The global structure should be something like a list or set of groups where every group has a set of subgroups and every subgroup a set of levels. Something structured like this:

group
- subgroup
-- level
-- level
- subgroup
-- level
group
- subgroup
-- level

I tried to implement this the following way:

typedef std::set<int> levels;
typedef std::map<int,levels> subgroup;
typedef std::set<subgroup> subgroups;
typedef std::map<int,subgroups> group;
typedef std::set<group> groups;

But I can't seem to acces my elements. Maybe I'm doing it the wrong way or maybe this is just not a recommendable datastructure. Anybody any advice?