How to define a constructor in a struct?

Minas Mina minas_mina1990 at hotmail.co.uk
Sun Aug 5 09:05:53 PDT 2012


I want to make a struct that defines a constructor:

struct Point
{
	this()
	{
	}
}


However I get a compiler error:
"constructor main.Point.this default constructor for structs only 
allowed with @disable and no body"

I wrote a @disable next to it but same error. I don't understand 
what the "no body" part means.


More information about the Digitalmars-d-learn mailing list