Address of a class object

Paul phshaffer at gmail.com
Sun Jan 1 00:35:40 UTC 2023


Hello.  Thanks for any assistance.

Can I acquire the address of a class object, not a class variable 
(i.e. the instantiations of the class) but the object definition 
itself?

```d
class MyClass {char c}
...
MyClass MyClassVar;

writeln(&MyClassVar); // this compiles
writeln(&MyClass);    // this does not
```


More information about the Digitalmars-d-learn mailing list