[bbost graph] need help on adjacency_list< ListS, ...

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. -- Psst! Geheimtipp: Online Games kostenlos spielen bei den GMX Free Games! http://games.entertainment.gmx.net/de/entertainment/games/free

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

Hi Aaron
your guess is correct, my code tis rying to add int values to the graph.
is it a bad idea to use typedef std::pair
participants (3)
-
Aaron Windsor
-
bernhard lippmann
-
lippmann2@gmx.de