How to do "C++ classes"?
rempas
rempas at tutanota.com
Sun Sep 19 07:56:36 UTC 2021
On Saturday, 18 September 2021 at 22:16:32 UTC, Adam D Ruppe
wrote:
> 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();
> }
Works flawlessly! Thanks a lot!
More information about the Digitalmars-d-learn
mailing list