I created a sort of display tree with vectors. Objects in the tree might have children, and those children might have children too, the only thing is, I don't know how many... 

I created a loop, inside a loop, inside a loop, inside a loop... is there an elegant way to avoid writing down too many loops?

```
for (unsigned int i =0; i< vectorTree.size(); i++){
    if (vectorTree[i].hasChildren){
        for (unsigned int j = 0; j < vectorTree[i].children.size(); j++){
            if (vectorTree[i].children[j].hasChildren){
                for (unsigned int k = 0; k< 
                    vectorTree[i].children[j].children.size(); k++){
                        if (...
                }
            }
        }
    }

```

I would like to find an elegant way to do this, I'm sure it's something experimented coders already know, I'm just that new :D