<div class="gmail_quote">Hi, everyone<br><br>'adj_list_ra_edgelist.cpp' is a simple example of bgl, but I can not compile it with gcc 3.4.4 on cygwin/windows xp. Following are the codes:<br><br><blockquote style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;" class="gmail_quote"> #include <boost/config.hpp><br>#include <iostream><br>#include <boost/graph/adjacency_list.hpp><br><br>int<br>main()<br>{<br> using namespace boost;<br> typedef adjacency_list<vecS, vecS, bidirectionalS, no_property, <br> property<int, edge_weight_t, property<int, edge_index_t> >, <br> no_property, vecS> Graph;<br><br> const std::size_t n = 3;<br> typedef std::pair<std::size_t, std::size_t> E;<br> E edge_array[] = { E(0,1), E(0,2), E(0,1) };<br> const std::size_t m = sizeof(edge_array) / sizeof(E);<br> Graph g(edge_array, edge_array + m, n);<br> for (std::size_t i = 0; i < m; ++i)<br> std::cout << edges(g).first[i] << " ";<br> std::cout << std::endl;<br> <br> return 0;<br>}</blockquote><div><br>The error is located in the line 28, i.e. edges(g).first[i]. I think edges(g).first has the type of adjacency_list::edge_iterator. But how can I understand 'edges(g).first[i]'?<br> <br>Thanks,<br>Timothy Zhang<br></div> </div><br>