<div class="gmail_quote">Hi, everyone<br><br>&#39;adj_list_ra_edgelist.cpp&#39; 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 &lt;boost/config.hpp&gt;<br>#include &lt;iostream&gt;<br>#include &lt;boost/graph/adjacency_list.hpp&gt;<br><br>int<br>main()<br>{<br>&nbsp; using namespace boost;<br>&nbsp; typedef adjacency_list&lt;vecS, vecS, bidirectionalS, no_property, <br>

&nbsp;&nbsp;&nbsp; property&lt;int, edge_weight_t, property&lt;int, edge_index_t&gt; &gt;, <br>&nbsp;&nbsp;&nbsp; no_property, vecS&gt; Graph;<br><br>&nbsp; const std::size_t n = 3;<br>&nbsp; typedef std::pair&lt;std::size_t, std::size_t&gt; E;<br>&nbsp; E edge_array[] = { E(0,1), E(0,2), E(0,1) };<br>

&nbsp; const std::size_t m = sizeof(edge_array) / sizeof(E);<br>&nbsp; Graph g(edge_array, edge_array + m, n);<br>&nbsp; for (std::size_t i = 0; i &lt; m; ++i)<br>&nbsp;&nbsp;&nbsp; std::cout &lt;&lt; edges(g).first[i] &lt;&lt; &quot; &quot;;<br>&nbsp; std::cout &lt;&lt; std::endl;<br>

&nbsp; <br>&nbsp; return 0;<br>}</blockquote><div><br>The error&nbsp; is located&nbsp; in&nbsp; 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 &#39;edges(g).first[i]&#39;?<br>

<br>Thanks,<br>Timothy Zhang<br></div>
</div><br>