On 02/15/2017 05:49 PM, Jean Cesar wrote:

> So I'm a beginner in this language and have very little time I started
> I'm interested in apprehending concepts of object orientation
> polymorphism inheritance, multiple inheritance as in c ++

D is similar to C++ but also very different.

> but I did not
> understand how to use constructor in it
> Because I simply did.
>
> Class person
> {
>    person(){}
>    ~ Person () {}
> }
>
> And error ...

In D, constructor is always called this():

class Person
{
   this(){}
   ~this() {}
}

void main() {
    auto p = new Person();
}

Ali

Reply via email to