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

Why is c++ difficult?

0 Answers  


When we use Abstract Class and when we use Interface?where we will implement in real time?

0 Answers  


How do you test your code?

4 Answers   Microsoft,


Explain the use of virtual destructor?

0 Answers  


How to implement is-a and has-a class relationships?

0 Answers  






Where can I run c++ program?

0 Answers  


What are friend classes? What are advantages of using friend classes?

0 Answers  


write the prime no program in c++?

16 Answers  


What are put and get pointers?

0 Answers  


What is c++ virtual inheritance?

0 Answers  


How to demonstrate the use of a variable?

0 Answers  


advantages and disadvantages of using Borland C++ / version 5.

1 Answers  


Categories