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
Why was c++ created?
What is different in C++, compare with unix?
What are the two types of comments, and how do they differ?
describe private access specifiers?
What do you mean by translation unit in c++?
Explain the scope of resolution operator.
What is ostream in c++?
Write a note about the virtual member function?
What is constructor c++?
explain the reference variable in c++?
State the difference between delete and delete[].
Why is it called c++?
What is the most useful programming language?
Describe friend function & its advantages.
I want to write a C++ language program that: 1. Reads in the size of a square from the screen; 2. Prints a hollow square of that size out of “-“, “|” and blanks on screen; 3. Prints the same hollow square onto a text file. The program should work for squares of all side sizes between 1 and 20.