[Lemon-user] Class delcaration

Ethan Kim ethkim at gmail.com
Wed Jan 5 17:53:02 CET 2011


Hi,

I'm new to lemon graph library, and I have a simple problem. I'm
declaring a graph class that contains lemon's ListGraph class,
together with NodeMap as a member variable.


class Network {
public:
	Network();
	virtual ~Network();
private:
	ListGraph g;
	ListGraph::NodeMap<string> vname;
};

But when I define a constructor as below:


Network::Network() {
	vname = new ListGraph::NodeMap<string>(g);
}

The compiler complains that there is no constructor:

no matching function for call to
'lemon::GraphExtender<lemon::ListGraphBase>::NodeMap<std::string>::NodeMap()'.

Is there an obvious step I'm missing here?

Thank you!



More information about the Lemon-user mailing list