You should take a look at this: http://tour.dlang.io/
On Sunday, 20 March 2016 at 02:21:51 UTC, Mike Parker wrote:
On Saturday, 19 March 2016 at 20:24:15 UTC, szymski wrote:
class A {
B b = new B();
}
This is *default* initialization, not per instance
initialization. The compiler will create one instance of B and
it will become the
Hello!
I'm having a big problem with class members. I'm kinda new to D,
so this may be my fault, but look at the following code:
import std.stdio;
class B {
int variable;
}
class A {
B b = new B();
}
void main()
{
// Create 10 instances of A
foreach(i; 0