
On Wednesday, 4. May 2011 13:07:31 Carlo jardinier wrote:
I try to use the adjacency list from boost. I can fill the list with vertices and edges, but somehow I cannot access a specific vertex or edge.
For example this is not working (see test.cpp): ** struct EdgeProperties { bool bConnectedBond; EdgeProperties(){bConnectedBond=false;} }; struct VertexProperties{ int index; int spin; bool bOnCluster; VertexProperties(): spin(){ bOnCluster = false;} ~VertexProperties(){ } }; typedef adjacency_list< vecS, vecS, bidirectionalS, VertexProperties, EdgeProperties > Graph; typedef graph_traits< Graph >::vertex_iterator Vit;
Graph g(9); unsigned int i = 3; Vit vi; vi = vertex(i,g); **
I want vi to bi an iterator that points on the 3. vertex of the graph g. I attached the error message from g++ when compiling.
Here (gcc-4.3.4 and boost-1.42), I get no error messages. It compiles fine. What is your system configuration please?
Can anyone help?
Best, Cedric