|
Boost Users : |
From: Goldman, Jon (jgoldma_at_[hidden])
Date: 2005-10-28 16:39:06
Hello,
I am using Microsoft Development Environment 2002. I am trying to
compile a Graph and use bundled properties.
The error I am getting:
\src\vtkSNL\Applications\RouteViz\rtrGraph.cxx(37) : error C2676: binary
'[' : 'SimpleGraph' does not define this operator or a conversion to a
type acceptable to the predefined operator
\src\vtkSNL\Applications\RouteViz\rtrGraph.cxx(37) : error C2228: left
of '.i' must have class/struct/union type
The code snippet below exhibits the problem:
struct nodeProp {
int i;
};
struct edgeProp {
int i;
};
typedef adjacency_list<boost::listS, boost::vecS, boost::bidirectionalS,
nodeProp, edgeProp> SimpleGraph;
void someFunc()
{
SimpleGraph someGraph(3);
Graph::vertex_descriptor v = *vertices(someGraph).first;
someGraph[v].i = 7; // This line is where the error is occuring
}
Anybody familiar with this problem?
Thanks for looking this over,
-Jon
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