Please see the code below.
class my_visitor: public default_dfs_visitor {
public:
my_visitor(){}
void finish_vertex(Vertex u, const Graph & g);
vector<Vertex> getFinishingOrder(void){return finishingOrder;}
//private:
vector<Vertex> finishingOrder;//stores the vertices in the finishing
order
My problem: size of the finishingOrder vector is zero outside the
my_visitor::finish_vertex method. I checked its size inside the
my_visitor::finish_vertex method and its value is increasing...
Does I miss something in the understanding of the visitor concept?