|
Boost Users : |
From: Jeremy Siek (jsiek_at_[hidden])
Date: 2004-03-27 19:54:52
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.
Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net