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


Please Help Members By Posting Answers For Below Questions

find the two largest values among the 6 numbers using control structures : do-while,for,if else,nestedif- else ,while. one or two of them.

1989


Why was c++ created?

542


write asingle linked list which read from two list & the do the following 1 sort the prime & nonprime num (prime should be less tn nonprime) 2 each node has a prime num followd by nonprime 3 add a new node into its sutable plce 4 erase the most three duplicated non prime num 5 find the least duplicated prime num

2194


I want explanation for this assignment: how to connect mysql database using c/c++,please explain this detailly?

1576


What are the uses of typedef in a program?

607






What does it mean to declare a destructor as static?

619


Do you know what are pure virtual functions?

636


What is a c++ object?

613


Show the declaration for a pointer to function returning long and taking an integer parameter.

568


Is it possible to have a recursive inline function in c++?

545


Why do we use iterators?

615


Explain stack unwinding.

626


Explain the operation of overloading of an assignment operator.

686


Write about the use of the virtual destructor?

598


What are single and multiple inheritances in c++?

570