Boost logo

Boost Users :

From: Stjepan Rajko (stipe_at_[hidden])
Date: 2008-01-10 01:43:48


On Jan 9, 2008 11:36 PM, Eric Fowler <eric.fowler_at_[hidden]> wrote:
> 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


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