知识点:C/C++ 5/10(单选) 下面这段程序,正确的输出是什么? ...
发布于 2022-03-03 17:30:54
下面这段程序,正确的输出是什么?
#include <iostream> struct A{ A(){cout<<"A::A"<<endl} ~A(){cout<<"A::~A"<<endl} } struct B:public A{ B(){cout<<"B::B"<<endl} ~B(){cout<<"B::~B"<<endl} } int main(){ A* a= new B delete a }
登录后免费查看答案
关注者
0
被浏览
23