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
How to handle exception in c++, For example in a functions i am assigning memory to some variables and also in next instructions in am dividing one variable also. If this functions generates a error while allocating memory to those variable and also while dividing the variable if i divide by zero then catch block how it will identify that this error has cone from perticular instruction
Write a program to implement OOPS concepts such as inheritance, polymorphism, friend function, operator overloading?
What is the fundamental idea of oop?
Can enum be null?
What is new keyword in oops?
Question: Write a program that prints a paycheck. Ask the program user for the name of the employee, the hourly rate, and the number of hours worked. If the number of hours exceeds 40, the employee is paid “time and a half”, that is, 150 percent of the hourly rate on the hours exceeding 40. Be sure to use stepwi se refine ment and break your solution into several functions. Use the int_name function to print the dollar amount of the check.
What is static in oop?
what's the basic's in dot net
INSTANCE FIELDS DECLARED private ARE ACCESSIBLE BY THE METHODS ONLY.CAN WE CHANGE THE private FIELD OF AN OBJECT IN A METHOD OF SOME OTHER OBJECT OF THE SAME CLASS?
What is overriding in oop?
Why is polymorphism used?
Why interface is used?
write a C++ program for booking using constructor and destructor.
What is class and example?
write string class as your own class in java without using any built-in function