Error: xxx is not an lvalue
flourish
t.spam at gmx.de
Sat May 2 12:04:55 PDT 2009
Thanks for your reply,
but I get the same error when using:
test.testMap()[0] = 1;
== Quote from dennis luehring (dl.soluz at gmx.net)'s article
> On 02.05.2009 20:44, flourish wrote:
> > Hi,
> >
> > why does the following code not compile -- or how to declare a (usable)
> > property of an associative array field?
> >
> > //////////////////////
> > class Test
> > {
> > private int[int] _testMap;
> > public int[int] testMap() {return _testMap;}
> > }
> >
> >
> > void main()
> > {
> > Test test = new Test();
> > test.testMap[0] = 1;
> > }
> > /////////////////
> >
> > *** Error: test.testMap() is not an lvalue
> test.testMap()[0] = 1;
More information about the Digitalmars-d
mailing list