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
Question 1 Write a program in ‘C' to check whether a given number is even or odd Question 2 Explain while and do... while loop with an example Question 3 Write a program

Recursive Functions Recursion is a process by which a function includes itself with a condition for its safe exit. It is best suitable for a recursive problem. A typical exampl


Write a program that reads a line of characters from the user and displays that entire line after converting any uppercase characters to lowercase also change any lowercase charact

b) The static keyword let a variable to maintain its value among distinct function calls. If the value of a static variable alters while the variable has been accessed, variable


How must runtime errors be handled in C++ - Runtime errors in C++ can be handled using exceptions. - This exception handling mechanism in C++ is developed to handle errors i


TO CONVERT A NUMBER OR A DIGIT INTO ALPHABET

Write a program to find the area under the curve y = f(x) between x = a and x = b, integrate y = f(x) between the limits of a and b