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
Operator Overloading Fundamentals The C language uses the concept of Operator Overloading discreetly. The asterisk (*) is used as multiplication operator as well as indirect

How to write a function template A function template should be written at the beginning of the program in the global area, or you may place it into a header file. All function

what is the purpose of pointer ? what is the syntax? how it works?

Explain the class invariant. - It's a condition that ensures correct working of a class and defines all the valid states for an object. - When an object is created class inv

//Create a custom calculator program capable of reading the input stream of an expression //and make basic computations to provide answer. //Your program will ask the user to

d) a "static destructor" is a static member function of the class which accepts one argument - a pointer to the object of that class to be cracked. It is probably utilized along wi

Reference Oddities A reference variable can demote to any integer variable, be it in an array or a member variable from structure or class. Reference variables can demote to co

develop an algorithm using pseudocode for computing cos(x) and sin(x). use a sentinel controlled while loop. use the series definition of e^+-jx

A: This is a name that acts as an alias, or alternative name, for a beforehand defined variable or an object. prepending variable along with "&" symbol makes it as reference. fo

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. The area under a curve between two points can b