3 ms·
No, it will complain that A::foo is pure virtual, and that B must implement `foo`. However, if you define in B the method `void foo() { A::foo(); }`, it will wo
by pbsd 11y ago
No, it will complain that A::foo is pure virtual, and that B must implement `foo`. However, if you define in B the method `void foo() { A::foo(); }`, it will work. In destructors this happens implicitly.
There was an old Herb Sutter GotW about this: http://www.gotw.ca/gotw/031.htm http://www.gotw.ca/gotw/031.htm