How to do "C++ classes"?

Adam D Ruppe destructionator at gmail.com
Sat Sep 18 22:16:32 UTC 2021


On Saturday, 18 September 2021 at 15:38:38 UTC, rempas wrote:
> I'm seeing in the page about "BeterC" and in the part about the 
> [retained 
> features](https://dlang.org/spec/betterc.html#retained), the 
> #11 says about "COM classes and C++ classes". What are the "C++ 
> classes"? I tried to create a class using "extern(C++)" but 
> this didn't worked. Can someone make an example on that?

extern(C++)
class Foo {}

void main() {
     scope Foo foo = new Foo();
}




More information about the Digitalmars-d-learn mailing list