betterC: new operator

Dibyendu Majumdar mobile at
Sun Nov 22 11:54:01 UTC 2020

I had assumed that new operator is not available in betterC.

But in following code, it seems the only way to initialize the 
object correctly ... is there another way I am missing? How 
should one cleanup objects?

import core.stdc.stdio : printf;

extern (C++) abstract class A {
     void sayHello();

extern (C++) class B : A {
     override void sayHello() {

extern (C) void main() {
     scope b = new B;

More information about the Digitalmars-d mailing list