why all c++ program must have default constructor?
Answer Posted / bhuvan singh
a defaulft constructor is created that takes no parameters
and does nothing.that takes no arguments but sets up your
object as required.
A defaulft constructor ,but by no convention so is any
constructor that takes parameters ,this is can be a bit confusing ,but is usually clear from context which one is meant.
A default constructor is not made by the compiler.so if u want a constructor that takes no parameters ,and u,ve created any others constructors ,u must make the default constructor urself.
"that if u make any constructor at all."
| Is This Answer Correct ? | 1 Yes | 5 No |
Post New Answer View All Answers
What is the use of volatile variable?
How a new element can be added or pushed in a stack?
Can we define function inside main in c++?
Program to check whether a word is a sub-string or not of a string typed
What size is allocated to the union variable?
Can you write a function similar to printf()?
What is the difference between global variables and static varables?
What is buffer and example?
What is copy constructor? Can we make copy constructor private in c++?
What are the advantages of using const reference arguments in a function?
Difference between pointer to constant vs. Pointer constant
Specify different types of decision control statements?
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
How do you flush std cout?
What is the difference between passing by reference and passing a reference?