Address of a class object

Ali Çehreli acehreli at yahoo.com
Thu Jan 5 05:59:26 UTC 2023


On 1/4/23 20:04, Paul wrote:
 >> (Again, there is no problem here; we are just learning.)
 >> Ali
 >
 > Do I have this much right?

 > ..with this output?

Looks good to me.

While we're here, you can force the class objects to be on the stack as 
well:

     scope MyClassVar1 = new MyClass();

I replaced 'auto' with 'scope'.

Ali



More information about the Digitalmars-d-learn mailing list