Possible Duplicate:
Why does an overridden function in the derived class hide other overloads of the base class?
Hi,
Let me explain my question with this example :
class A
{
virtual ~A() = 0 { }
A(const A&);
virtual void operator =(const A&) = 0;
}
class B : public A
{
~B();
B(const B&);
void operator =(const B&);
}
void main(void)
{
A* a = new B();
delete a; // Is ~A() called, ~B() or both ?
}
This brings me to ask two questions :
- Which destructor is called when using delete on an abstract-base-class pointer ?
- Is it possible to make a copy of my object "a" with one of the copy methods above ?