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 kind of problems can be solved by a namespace?

0 Answers  


What is abstraction in c++?

0 Answers  


Tell me an example where stacks are useful?

0 Answers  


Will c++ be replaced?

0 Answers  


What are the benefits of operator overloading?

0 Answers  






How do you test your code?

4 Answers   Microsoft,


Evaluate as true or false: !(1 &&0 || !1) a) True b) False c) Invalid statement

0 Answers  


What are the various oops concepts in c++?

0 Answers  


Which programming language should I learn first?

0 Answers  


How do we balance an AVL Tree in C++?

0 Answers   Impetus,


What are the extraction and insertion operators in c++? Explain with examples.

0 Answers  


What is std namespace in c++?

0 Answers  


Categories