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
Describe friend function & its advantages.
How the endl and setw manipulator works?
What are friend classes? What are advantages of using friend classes?
C is to C++ as 1 is to a) What the heck b) 2 c) 10
What is encapsulation in c++?
What is the prototype of printf function?
What apps are written in c++?
Do vectors start at 0?
What are containers in c++?
What gives the current position of the put pointer?
What is difference between rand () and srand ()?
Why can’t you call invariants() as the first line of your constructor?
How will you call C functions from C ++ and vice-versa?
How is data hiding achieved in c++?
How to access a variable of the structure?