Friday, November 29, 2013

Virtual Keyword in C++

Simple Note

Use virtual keyword to define a function in a class that can be redefined in its derived class.

The only valid declaration (virtual or non-virtual) is the declaration within first level Class (first level here means the base class), redefine it in derived class will be ignored.

Also refer to

Tested with Dev-C++




No comments:

Post a Comment