On Thu, Apr 3, 2008 at 5:59 PM,
To use the remove_edge() function I have to change my graph definition from typedef adjacency_list< vecS, vecS, ....> to adjacency_list< ListS, listS, ....> .
now the add_edge (...) function gives me an error while compiling:
'boost::add_edge' : cannot convert parameter 1 from 'int' to 'void *'
what does this mean ????
also using these typedefs:
typedef graph_traits < TGraph >::vertex_descriptor Tvertex_descriptor; typedef graph_traits < TGraph >::edge_descriptor Tedge_descriptor; typedef graph_traits <TGraph>::vertex_iterator Tvertex_iter; typedef graph_traits <TGraph>::edge_iterator Tedge_iter;
seems to be no good idea, because I get many compiler errors now? Any help is welcome.
Most likely, you're trying to pass integers to add_edge instead of
using vertex descriptors. You should be passing vertex descriptors to
add_edge that you've obtained either by iterating over the vertices in
the graph or as a result of calling add_vertex. For example,
Tvertex_descriptor u = add_vertex(g);
Tvertex_descriptor v = add_vertex(g);
add_edge(u,v,g);
or, if you really need to refer to them as integers, iterate through
all of the vertices, put them in a std::vector