[Lemon-user] declaration error
Alpár Jüttner
alpar at cs.elte.hu
Thu Mar 17 06:43:09 CET 2011
Hi,
>
> in another namespace
>
>
> class xyz{
> public:
> typedef lemon::ListDigraph NetworkGraph;
>
>
> private:
> NetworkGraph network_graph;
> lemon::ListDigraph::ArcMap<int> weight_map(network_graph);
>
In C++, the constructor parameters of a nested class must be given at
the parent class constructor definition, like this:
class xyz{
public:
typedef lemon::ListDigraph NetworkGraph;
private:
NetworkGraph network_graph;
lemon::ListDigraph::ArcMap<int> weight_map;
public:
xyz() : weight_map(network_graph)
{
...
}
};
Regards,
Alpar
More information about the Lemon-user
mailing list