[Lemon-user] Maps as member variables?

Lars Karlsson klars3000 at yahoo.com
Mon Oct 31 11:54:44 CET 2011


Please ignore the previous question, I made a stupid mistake. I have to put this into the ctor initializer list:

MyClass::MyClass( )
:
id( g )
{}

Cheers,

________________________________
From: Lars Karlsson <klars3000 at yahoo.com>
To: "lemon-user at lemon.cs.elte.hu" <lemon-user at lemon.cs.elte.hu>
Sent: Monday, October 31, 2011 3:42 AM
Subject: Maps as member variables?


Hello!
How can I actually declare a map as a class member variable?
I tried the following:
class MyClass {
public:
lemon::ListDigraph g; // digraph   
lemon::ListDigraph::NodeMap<int> map(g);
};

... however I'm getting C2601 error in VC++ 2008? 

error C2061: syntax error : identifier 'g'

What am I missing here? Can I declare and define NodeMaps on stack only?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lemon.cs.elte.hu/pipermail/lemon-user/attachments/20111031/71db3455/attachment.html>


More information about the Lemon-user mailing list