Define pure virtual function or abstract class?, C/C++ Programming

Define pure virtual function or abstract class?

 

 

Posted Date: 3/16/2013 2:42:09 AM | Location : United States





A: While you de_ne only function prototype in a base class with no implementation & do the total implementation in derived class. This base class is called as abstract class & client won''t capable to instantiate an object by using this base class. You can develop a pure virtual function or

abstract class this way.. class Boo

{

void foo() = 0;

}

Boo MyBoo; // compilation error

 

Posted by | Posted Date: 3/16/2013 2:42:20 AM


Related Discussions:- Define pure virtual function or abstract class?, Assignment Help, Ask Question on Define pure virtual function or abstract class?, Get Answer, Expert's Help, Define pure virtual function or abstract class? Discussions

Write discussion on Define pure virtual function or abstract class?
Your posts are moderated
Related Questions
A palindrome is a string that reads the same from the both the ends. Given a string S convert it to a palindrome by doing character replacement. Your takes is to convert S to palin

Rules of Operator Overloading It is a function defined to an operator with new term or meaning. It cannot produce new operator. It cannot modified the meaning of th

Pure Virtual Functions An abstract class is one, which is used just for deriving some other classes. No object of this class is declared and used in the program. Likewise, ther

Intelligent homes are becoming increasingly popular as the cost/performance ratio of microcontrollers is continuously dropping.  These systems incorporate various transducers to de

#include stdio.h   struct  complex   {   float real;   float imag;   };   struct complex complexadd(struct complex,struct  complex);   void main()     {          Date: 26

Dereferencing the Pointer this Sometimes a member function requires to make a copy of the invoking instance so that it can change the copy without affecting the original instan

Normal 0 false false false EN-US X-NONE X-NONE

how to decode a number from mobile keypad

A: Provided that function parameter is "const reference", compiler create temporary variable in following two ways. a) The actual argument is the correct type, however it isn't

Additional keywords in C++ Class     friend    virtual   inline private  public    protected     const this         new       delete   operator The actual use and expl