How to avoid a class from instantiation?
Answer Posted / achal
Making a constructor private is perfectly legal.
But now u can't create instance of that class.
| Is This Answer Correct ? | 1 Yes | 1 No |
Post New Answer View All Answers
Does std endl flush?
What are the advantages of using a pointer? Define the operators that can be used with a pointer.
What is the v-ptr?
Can you pass an array to a function in c++?
Evaluate the following expression as C++ would do :8 * 9 + 2 * 5 a) 82 b) 79 c) 370 d) list
Is python better than c++?
What do you mean by stack unwinding in c++?
What are the uses of static class data?
what is c++
What are smart pointers?
What is a static element?
What is a c++ vector?
What is the auto keyword good for in c++?
What is oop in c++?
How can you prevent accessing of the private parts of my class by other programmers (violating encapsulation)?