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

What is microsoft c++ redistributable 2013?

575


Differentiate between a constructor and a method in C++.

563


Can non graphic characters be used and processed in C++?

704


Explain the advantages of using friend classes.

585


What is the purpose of templates in c++?

563






What are smart pointers?

672


What are the differences between java and c++?

528


What are separators in c++?

624


Can I learn c++ without c?

603


What are c++ data types?

638


Can circle be called an ellipse?

636


What are c++ files?

579


What is microsoft c++ redistributable?

612


What is the use of :: operator in c++?

599


Why can’t you call invariants() as the first line of your constructor?

558