Marcelo Pinto wrote:
> On 6 mar, 09:53, "v4vijayakumar" <vijayakumar.subbu...@gmail.com>
> wrote:
>> No, I'm not from Missouri, but I have seen this in the comp.lang.c++
>> faqs [6.9]. Are there any reasons to keep this with the question?
>>
>> Just curious. 
>
> It is [6.10] as a matter of fact. I am curious too.
Old code:
class A {
public:
virtual ~A() {}
virtual void foo(int); // whatever
};
void bar(A* pa) { // library function
pa->foo(42);
}
New code:
class B : public A {
void foo(int); // new code = new behaviour
};
...
A *pa = new B;
..
bar(pa); // making old code call new code
V
--
Please remove capital 'A's when replying by e-mail
I do not respond to top-posted replies, please don't ask