|
Boost Users : |
Subject: Re: [Boost-users] a vector of subgraphs
From: fabricio (fabricio.olivetti_at_[hidden])
Date: 2009-04-07 22:53:40
oh sorry, forgot to mention, after
vector< Graph& > subG;
I should have something like:
subG.resize(2);
subG(0) = G.subgraph();
and subgraph() returns a Graph&
On 7 abr, 21:04, "James C. Sutherland" <James.Sutherl..._at_[hidden]>
wrote:
> On Apr 7, 2009, at 4:59 PM, fabricio wrote:
>
>
>
> > typedef subgraph< adjacency_list > Graph;
>
> > Graph G;
>
> > what I want is to create a:
>
> > vector< Graph& > subG;
>
> > but the usage of & here is illegal.
>
> Why not use pointers?
> vector<Graph*> subG;
> or
> vector< boost::shared_ptr<Graph> > subG;
> _______________________________________________
> Boost-users mailing list
> Boost-us..._at_[hidden]http://lists.boost.org/mailman/listinfo.cgi/boost-users
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