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
Carry out conversion of one object of user-defined type to another?
Is c++ high level programming language?
What is prototype for that c string function?
What is the difference between public and private data members?
What is the use of endl in c++?
What is c++ runtime?
What is the difference between map and hashmap in c++?
When to use “const” reference arguments in a function?
What does new in c++ do?
What are the advantages of using friend classes?
Which recursive sorting technique always makes recursive calls to sort subarrays that are about half size of the original array?
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 is the difference between a "copy constructor" and an "assignment operator" in C++?
Define anonymous class.
Can we use struct in c++?