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
Structures A structure is a derived data type. It is a combination of logically related data items. Unlike arrays, which are a collection of such as data types, structures can

Comments Comments are integral part of every program . Comments help in coding, debugging and maintaining a program . The compiler ignores them. They should be used liberally i

write an algorithm for multiplication of two sparse matrices using linked lists

Question 1 Explain the following Object Oriented Concepts with suitable examples for each Question 2 Explain the following Object Oriented Methodologies Question 3 Descr

To write a program to use different levels of array of pointer to pointer & display the output as 1 1 1 2 2 2 3 3 3

(a) Write a procedure (count-even n) that counts the number of even digits in the decimal representation of the number n. For example, (count-even 234) should return 2. (b) Writ

Need assignment help What's the order that local objects are destructed?

Write a program that illustrate  Macros with Arguments? Macros is able to also have arguments, just as functions can. #define AREA(x)(3.14*x*x) Then at any time the prepr

A: It let you to provide an intuitive interface to users of your class, as well as makes it possible for templates to equally work well with classes and built-in/intrinsic types.

Operation on String - C ++ Program: Write a program to define operations on string in c++. class String {    char *char_ptr;   // pointer to string contents    int le