Define pure virtual function? why & when it is used?, C/C++ Programming

Define Pure Virtual Function? Why & when it is used?

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





The abstract class whose pure virtual method ought to be implemented through all the classes that derives on these. Or else it would result in a compilation error. This construct should be utilized while one wants to make sure that all the derived classes implement the method described  as pure virtual in base class.

 

Posted by | Posted Date: 3/16/2013 2:43:06 AM


Related Discussions:- Define pure virtual function? why & when it is used?, Assignment Help, Ask Question on Define pure virtual function? why & when it is used?, Get Answer, Expert's Help, Define pure virtual function? why & when it is used? Discussions

Write discussion on Define pure virtual function? why & when it is used?
Your posts are moderated
Related Questions
A: Use references when you can use, and use pointers when you have to. References are generally preferred over pointers whenever you don't require "reseating". Usually this mean

Write a program that predicts users’ age (0-128 years old) with at most 7 questions. The game starts with asking the user whether he/she is younger or older than G (an initial gues

Aim: To implement a program to display a rectangle, circle and triangle. Code:                       class shape {             public:                         vir

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

There is a pebble merchant. He sells the pebbles, that are used for shining the floor. His main duty is to take the length of the room’s sides. But he sometimes mistakes doing tha

Need someone to look over my assignment for correctness and make any necessary changes.

Deliverables: you are required to upload your c code in the assignment dropbox set in Moodle. You are supposed to work with Linux gcc compiler and pico editor for compiling via the

Task 1 Demonstrate a Java client and server exchanging one text message in each direction. Task 2 Demonstrate a C client and server exchanging one text message in each

Overall Program Objective: You will design and simulate a basic RISC processor.   You will create and encode an instruction set.  Your final task will be to "compile" a program

Implementation of the Definition class: void Definition::put_word(char *s) {    word = new char[strlen(s)+1];    strcpy(word,s);    nmeanings = 0; }   voi