Answer Posted / gp
Class which cannot be initiated is an abstract class.
You can make a class abstract by declaring a pure virtual method inside the class. For example:
class base
{
void func()=0;
};
void main()
{
base b;
}
Now you cannot instantiate base class.
The class which inherits this base class will also become abstract unless you define a body of the func() method in inherited class.
| Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers
Why is polymorphism needed?
What is advantage of inheritance?
What is encapsulation oop?
What are the 4 pillars of oop?
can inline function declare in private part of class?
What exactly is polymorphism?
if i have same function with same number of argument but defined in different files. Now i am adding these two files in a third file and calling this function . which will get called and wht decide the precedence?
How is class defined?
What are the 3 principles of oop?
Explain virtual inheritance?
What is inheritance and how many types of inheritance?
which feature are not hold visual basic of oop?
What makes a language oop?
Why is oop better than procedural?
#include