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
When is the destructor called?
What is a map in c++?
If a function doesn’t return a value, how do you declare the function?
What happens when the extern "c" char func (char*,waste) executes?
Out of fgets() and gets() which function is safe to use and why?
What is the use of turbo c++?
What is the main purpose of c++?
What are keywords in c++?
Can you help me with this one? Make a program that when a user inputed a Product Name, it will display its price, and when the user inputed the quantity of the inputed product, it will show its total price. The output must be like this: Product Name: Price: Quantity: Total Price: ..this is the list of products to be inputed: Cellphone - 1500 Washing Machine - 5200 Television - 6000 Refrigirator - 8000 Oven - 2000 Computer - 11000 thanks..:D
What are the unique features of C++.
What is the latest c++ version?
Why do we learn c++?
Can we define function inside main in c++?
Can I learn c++ without learning c?
Should I learn c or c++ or c#?