www.digitalmars.com         C & C++   DMDScript  

D - [Docs] Missing new operator

reply Manfred Nowak <svv1999 hotmail.com> writes:
http://www.digitalmars.com/d/attribute.html, [cited 31.01.04]

In Section `Static Attribute':
<cite>

	class Foo
	{
	    static int bar() { return 6; }
	    int foobar() { return 7; }
	}

	...

	Foo f;
	Foo.bar();	// produces 6
	Foo.foobar();	// error, no instance of Foo
	f.bar();	// produces 6;
	f.foobar();	// produces 7;

</cite>

Change to:

[...]
     Foo f = new Foo;
[...]

So long.
Jan 30 2004
parent "Walter" <walter digitalmars.com> writes:
Done. Thanks, -Walter
Feb 02 2004