下面的编程结果是:class&nbspIBase&nbsp{publi...
发布于 2022-03-03 16:27:57
下面的编程结果是:
class IBase {
public:
IBase() {}
~IBase() {}
public:
virtual void Out() = 0
}
class IDerived : public IBase {
public:
IDerived() {}
virtual ~IDerived() {}
public:
virtual void Out() {
printf("hello, world")
}
}
IBase *base = new IDerived()
base->~IBase()
base->Out()
class IBase {
public:
IBase() {}
~IBase() {}
public:
virtual void Out() = 0
}
class IDerived : public IBase {
public:
IDerived() {}
virtual ~IDerived() {}
public:
virtual void Out() {
printf("hello, world")
}
}
IBase *base = new IDerived()
base->~IBase()
base->Out()
登录后免费查看答案
关注者
0
被浏览
20