J
Johan
Hi,
I am new to C++. Why use virtual functions
class A
{
public :
A() {}
virtual ~A() {}
virtual void paint() {......}
};
class B : public A
{
public :
B() {}
virtual ~B() {}
virtual void paint() {......}
};
Why do paint have to be virtual if it has its own member function paint. Why
do you want to use virtual functions ?
John
I am new to C++. Why use virtual functions
class A
{
public :
A() {}
virtual ~A() {}
virtual void paint() {......}
};
class B : public A
{
public :
B() {}
virtual ~B() {}
virtual void paint() {......}
};
Why do paint have to be virtual if it has its own member function paint. Why
do you want to use virtual functions ?
John