C++Virtual Member Functions

Download C++ for free

Syntax

  • virtual void f();

  • virtual void g() = 0;

  • // C++11 or later:

    • virtual void h() override;
    • void i() override;
    • virtual void j() final;
    • void k() final;

Remarks

Related Examples

Behaviour of virtual functions in constructors and destructors