How to create a pure virtual function?



How to create a pure virtual function?..

Answer / hrpynux@gmail.com

You declare a pure virtual function by using a pure specifier ( = 0 ) in the declaration of a virtual member function in the class declaration. Class A is an abstract class. The compiler would not allow the function declarations A g() or void h(A) , declaration of object a , nor the static cast of b to type A .

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More C++ General Interview Questions

What is vectorial capacity?

0 Answers  


How a modifier is similar to mutator?

0 Answers  


How do you declare a set in c++?

0 Answers  


What are c++ storage classes?

0 Answers  


What is a c++ vector?

0 Answers  






What is constructor in C++?

0 Answers  


pls help.. paper bills.. 1000, 500, 100, 50, 20, 10, 5, 1.. create a program that will count all the paper bills in the number being input.. example: enter a number: 3886 there is/are: 3 ->1000 1 ->500 3 ->100 1 ->50 1 ->20 1 ->10 1 ->5 1 ->1 example2: enter a number: 728 there is/are: 0 ->1000 1 ->500 2 ->100 0 ->50 1 ->20 0 ->10 1 ->5 3 ->1

4 Answers  


What are the various arithmetic operators in c++?

0 Answers  


What is name mangling?

3 Answers  


Define precondition and post-condition to a member function?

1 Answers  


What is implicit pointer in c++?

0 Answers  


How many ways can a variable be initialized into in C++?

0 Answers   HCL,


Categories