手一黏便緊(UTC+9
2022-6-1 11:17:29
Nope
He means, say C derives from A and B and has virtual method
You may find &c ≠ (A*)&c ≠ (B*)&c
Ads
力=質量x加速度
2022-6-1 11:23:49
此回覆已被刪除
Code4Food
2022-6-1 11:26:48
Have you tried adding a virtual destructor for Node?
class Node {
public:
// This needs to be virtual so that we call the correct destructor
// when freeing a child class object.
virtual ~Node() = default;
手一黏便緊(UTC+9
2022-6-1 11:28:54
Provide a definition to your pure virtual destructor.
Seems nothing done with smart pointer/vector.
He means, say C derives from A and B and has virtual method
You may find &c ≠ (A*)&c ≠ (B*)&c