Answer Posted / guest
RE: #1
You can have private constructors. It's pretty common
practice when you create a class which you want to never be
constructed with "new" from outside the class (for example,
if you have a static factory member of the class).
Is This Answer Correct ? | 10 Yes | 1 No |
Post New Answer View All Answers
What is a pointer with example?
What is null pointer and void pointer and what is their use?
What are single and multiple inheritances in c++?
Write a program to find the reverse Fibonacci series starting from N.
Are there interfaces in c++?
What are the manipulators in c++?
You run a shell on unix system. How would you tell which shell are you running?
What is the difference between *p++ and (*p)++ ?
What is polymorphism & list its types in c++?
What is encapsulation in C++? Give an example.
What is the first name of c++?
What is the maximum combined length of command line arguments including the space between adjacent arguments?
Where are setjmp and longjmp used in c++?
What do you mean by ‘void’ return type?
Can you explicitly call a destructor on a local variable?