28 Mar
2004
28 Mar
'04
12:54 a.m.
Hi Adel, On Mar 27, 2004, at 9:13 PM, Adel Essafi wrote:
NameType src_name; boost::graph_traits<Graph>::vertex_iterator vi;
for (vi=in_edges(v,g).first; // XXXXXXXX vi!=in_edges(v,g); ++vi){
The return type of in_edges() is a pair of in_edge_iterator's, not vertex_iterator's. So you should do something like this instead: boost::graph_traits<Graph>::in_edge_iterator ei; for (ei=in_edges(v,g).first; ei != in_edges(v.g).second; ++ei){ Hope that helps, Jeremy P.S. Also I recommend using boost::tie in the for loop, as is done in most of the graph examples.