• 2021-04-14
    写出程序运行结果:_________
    #include
    class Bas
    {
    public:
    ~Bas()
    {
    cout<<"Bas construct"<}
    virtual void f()=0;
    };
    class Dev:public Bas
    {
    public:
    ~Dev()
    {
    cout<<"Bas construct"<}
    virtual void f()
    {
    cout<<"Dev::f"<}
    };
    void main()
    {
    Bas *a;
    Dev p;
    a=&p;
    a->f();
    }
  • 举一反三