About virtual
Posted: Wed Jan 11, 2006 4:49 am
I'm C programmer and I want to know about C++ language features. Can someone explain to me in clear and easy-to-understand language about these:
a. Can constructor declare using virtual? If yes, what does it mean?
b. Can destructor declare using virtual? If yes, what does it mean?
c. Can we inherit class using virtual? Example:If yes, what does it mean?
d. What's the difference between:and
Thanx in advance 
a. Can constructor declare using virtual? If yes, what does it mean?
b. Can destructor declare using virtual? If yes, what does it mean?
c. Can we inherit class using virtual? Example:
Code: Select all
class Master
{
...
};
class Derived : virtual public Master
{
...
};
d. What's the difference between:
Code: Select all
virtual void print( void );
Code: Select all
virtual void print( void ) = 0;
