#include <iostream> struct A { ~A() { std::cout << "~A"; }; }; struct B: public A { virtual ~B() { std::cout << "~B"; }; }; int main() { A *a = new B(); delete a; return 0; }
A
Login in to like
Login in to comment
or Read more about C++ Quizzes
Login in to like
Login in to comment