What Is Pure Virtual Function In OOP

  • 2 Jan, 2012

    When you define only function prototype in a base class without and do the complete implementation in derived class. This base class is called abstract class and client won?t able to instantiate an object using this base class.A pure virtual function is a function that must be overridden in a derived class and need not be defined. A virtual function is declared to be "pure" using the curious "=0"syntax:class Base {public:void f1(); // not virtualvirtual void f2(); // virtual, not purevirtual void f3() = 0; // pure virtual};

    Comments Received:
    Please give your suggestions and feedback:

2009-2016 downloadmela.com. All rights reserved.