std::stack lacks iterators and to rebuild the path at the end, I need to iterate from bottom going up. I could of course make then result = pathStack.top() + "/" + result, but that seem less efficient

std::vector is an array, and I was always told to use lists if I grow the container, don't store millions of items and don't need to access them by an index