Problem compiling some simple code ..

I have been fiddling with this library off and on for some time ... now am
getting this error:
/home/eric/boostplay/g0/src/g0.cpp:55: error: no matching function for call
to 'add_vertex(Graph (&)())'
/home/eric/boostplay/g0/src/g0.cpp:56: error: no matching function for call
to 'add_edge(Vertex&, Vertex&, Graph (&)())'
on this code:

On Jan 9, 2008 11:36 PM, Eric Fowler
I have been fiddling with this library off and on for some time ... now am getting this error:
/home/eric/boostplay/g0/src/g0.cpp:55: error: no matching function for call to 'add_vertex(Graph (&)())' /home/eric/boostplay/g0/src/g0.cpp:56: error: no matching function for call to 'add_edge(Vertex&, Vertex&, Graph (&)())'
on this code:
[snip]
int main(int argc, char *argv[]) { Graph g();
try instead: Graph g; Graph g(); gets interpreted as a function declaration. In the errors, you can see that type of g is listed as "Graph (&)()" (rather than Graph) HTH, Stjepan
participants (2)
-
Eric Fowler
-
Stjepan Rajko