• 2021-04-14
    若有如下类,则执行语句 A *a=new B(10); delete a;输出结果为()。
    class A{
    public:
    virtual ~A{ cout<
    };
    class B:public A{
    char *buf;
    public:
    B(int i) { buf=new char[i]; }
    virtual ~B{
    delete []buf;
    cout<
    }
    };
  • 举一反三