using DFS visitors

hello all,
we are trying to use a DFS visitor in a similar way as the BFS visitor which is used in the example "bfs.cpp" (boost 1.31.0), that is the code, but it complains about a lot of errors in the internal boost library files...
#include
Graph;
Graph G(11); boost::add_edge(5, 6, G); boost::add_edge(0, 1, G); // 0 es el + boost::add_edge(1, 2, G); boost::add_edge(1, 3, G); boost::add_edge(2, 4, G); boost::add_edge(3, 5, G); boost::add_edge(4, 6, G); boost::add_edge(5, 7, G); // 7 es el - boost::add_edge(5, 10, G); boost::add_edge(10, 11, G); boost::add_edge(11, 12, G); typedef graph_traits<Graph>::vertex_descriptor Vertex; typedef graph_traits<Graph>::vertices_size_type size_type; Graph G_copy(11); size_type d[11]; std::vector<Vertex> p(num_vertices(G)); std::fill_n(d,11,0); Vertex s=7; p[s]=s; boost::depth_first_search (G, visitor(boost::make_dfs_visitor( std::make_pair(boost::record_predecessors(&p[0],boost::on_tree_edge()), std::make_pair(MuestraOrdenV(G_copy,boost::on_finish_vertex()), MuestraOrden(G_copy, boost::on_tree_edge())))) ), s); // we can compile the visitor(...) clause alone, but not inside depth_first_search (...) clause. return 0; } thanks a lot Gus --------------------------------- [input] [input] [input]
participants (1)
-
Gustavo Sÿffffe1nchez