How to avoid a class from instantiation?
Answer Posted / chandrakant
make the class Abstract it will not be instantiated
and the pure virtual function is used to avoid the base call
function to be get called if we make a function as virtual
only a derived class function will get called
| Is This Answer Correct ? | 3 Yes | 0 No |
Post New Answer View All Answers
How many keywords are used in c++?
Can I have a reference as a data member of a class? If yes, then how do I initialise it?
We use library functions in the program, in what form they are provided to the program?
What are c++ storage classes?
What is c++ good for?
Write a program to encrypt the data in a way that inputs a four digit number and replace each digit by (the sum of that digit plus 7) modulus 10. Then sweep the first digit with the third, second digit with the fourth and print the encrypted number.
What is data types c++?
Difference between delete and free.
In a function declaration what does extern means?
Why cout is used in c++?
What is the main function c++?
Snake Game: This is normal snake game which you can find in most of the mobiles. You can develop it in Java, C/C++, C# or what ever language you know.
Which header file allows file i/o with streams a) fileio.h b) iostream.h c) fstream.h
What is an html tag?
What operators can you overload in c++?