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
Explain virtual inheritance?
What is difference between data abstraction and encapsulation?
Templates mean
What are the 3 principles of oop?
Who invented oop?
Why is there no multiple inheritance?
What is byval and byref? What are differences between them?
What is pointer in oop?
Why do we use polymorphism in oops?
How do you define a class in oop?
What is destructor give example?
What are the 4 pillars of oop?
Why multiple inheritance is not possible?
write a code for this. serial_number contained in the header of the file will be read , if this serial number is less than a previous serial number within a successfully processed file, or is the same as another serial number within a successfully processed file, or if the field contains anything other than 7 digits, then the file must error with the reason ‘Invalid SERIAL_NUMBER’.
Why is static class not inherited?