Metrico Wireless interview question

How to declare a pure virtual function? there is a class which which has two member function and a virtual member function. How can you instantiate the class?

Interview Answer

Anonymous

16 Mar 2011

virtual int area () =0; you can not directly instantiate a class with virtual function. you have to implement the virtual function in some derived class and then you can instantiate.