Note that there are some explanatory texts on larger screens.

plurals
  1. PODefining boost compressed sparse row graph
    primarykey
    data
    text
    <p>I know this might be obvious, but bear with me my generic programming background is weak.</p> <p>This is the code I am trying to compile :</p> <pre><code>#define BOOST_GRAPH_USE_NEW_CSR_INTERFACE #include &lt;boost/graph/compressed_sparse_row_graph.hpp&gt; #include &lt;vector&gt; typedef unsigned int uint32_t; typedef unsigned long uint64_t; using namespace boost; using namespace std; typedef compressed_sparse_row_graph&lt;directedS,void,void,no_property,uint32_t,uint64_t&gt; intl_graph; typedef std::pair&lt;uint32_t,uint32_t&gt; E; int main() { intl_graph g; vector&lt;E&gt; the_edges; uint32_t nv = 3; uint64_t nedge; the_edges.push_back(E(0,1)); the_edges.push_back(E(1,2)); g = intl_graph(edges_are_unsorted_t,the_edges.begin(),the_edges.end(),nv); //line 24 } </code></pre> <p>which results in this error : </p> <pre><code>boost_eg.cpp: In function âint main()â: boost_eg.cpp:24: error: expected primary-expression before â(â token boost_eg.cpp:24: error: expected primary-expression before â,â token </code></pre> <p>If I change line 24 to this :</p> <pre><code>intl_graph g_(edges_are_unsorted_t,the_edges.begin(),the_edges.end(),nv); </code></pre> <p>the error is this :</p> <pre><code>boost_eg.cpp: In function âint main()â: boost_eg.cpp:24: error: âthe_edgesâ is not a type boost_eg.cpp:24: error: expected â,â or â...â before â.â token </code></pre> <p>Any thoughts?</p> <p>The reference is over here :</p> <p><a href="http://www.boost.org/doc/libs/1_49_0/libs/graph/doc/compressed_sparse_row.html" rel="nofollow">http://www.boost.org/doc/libs/1_49_0/libs/graph/doc/compressed_sparse_row.html</a></p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload