What do you mean by pure virtual functions in C++? Give an example?

Answer Posted / hrpynux@gmail.com

A pure virtual function is a virtual function in C++ for which we need not to write any function definition and only we have to declare it. It is declared by assigning 0 in the declaration. An abstract class is a class in C++ which have at least one pure virtual function.

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

We use library functions in the program, in what form they are provided to the program?

838


What is the header file for setw?

807


What is the difference between method overloading and method overriding in c++?

775


Why is c++ still popular?

786


What is one dimensional array in c++?

814


Is c++ used anymore?

826


What is class and structure in c++?

764


What's c++ used for?

826


How c functions prevents rework and therefore saves the programers time as wel as length of the code ?

849


what are the iterator and generic algorithms.

1678


Is there any function that can skip certain number of characters present in the input stream?

786


How are pointers type-cast?

859


Can member data be public?

772


Describe linkages and types of linkages?

769


What is the difference between an array and a list?

771