How to avoid a class from instantiation?
Answer Posted / rsn
Yes, I agree with Ravi. Classes can be prevented from
instantiating and also from getting inherited using provate
constructors. The initialisation can be done using member
functions in which case it is called "clone" functions(I
hope so, Pls correct me if i'm wrong!).
| Is This Answer Correct ? | 2 Yes | 4 No |
Post New Answer View All Answers
Why is it necessary to use a reference in the argument to the copy constructor?
Explain the virtual inheritance in c++.
What is the use of register keyword with the variables?
How do you establish an is-a relationship?
Write about the stack unwinding?
What is diamond problem in c++?
How would you use the functions randomize() and random()?
how to connect with oracle 9i with server in socket program in c/c++
What can I safely assume about the initial values of variables which are not explicitly initialized?
How to declare an array of pointers to integer?
What is an incomplete type in c++?
Describe the setting up of my member functions to avoid overriding by the derived class?
What is a .lib file in c++?
What things would you remember while making an interface?
What is c++ coding?