Cannot get this C++ example migrated to D
Skippy
Skippy at gmail.com
Sun Apr 16 07:46:53 UTC 2023
On Sunday, 16 April 2023 at 06:39:17 UTC, Mike Parker wrote:
>
> `t1` is default-initialized, so it's null.
> test t1, t2 = new test();
silly me. I should have picked that up myself. thanks.
> Ditto for t3. Classes are reference objects, not value objects,
> so you must explicitly instantiate instances if you want them
> to be non-null.
> test t3;
again, silly me. I should have picked that up myself. thanks.
I wish D had value type classes as well.
More information about the Digitalmars-d-learn
mailing list