why all c++ program must have default constructor?
Answer Posted / rahin99435
The purpose of constructor is to initialize the class members and allocate necessary resources for them; at runtime.So by default C++ compiler is provided with a default constructor which performs the same job at runtime while the object is created.
There is provision of defining more than one constructor by changing the signatures to get objects of different kind.
| Is This Answer Correct ? | 2 Yes | 1 No |
Post New Answer View All Answers
What is srand c++?
Is there finally in c++?
Can we get the value of ios format flags?
How would you use the functions memcpy(), memset(), memmove()?
Is it possible to use a new for the reallocation of pointers ?
What does it mean to declare a member function as static?
How do I run a program in notepad ++?
Why is c++ still best?
Can a constructor be private?
What is a modifier in c++?
What is increment operator in c++?
Which software is best for c++ programming?
can any one help to find a specific string between html tags
which is changed to a sting..
weather.html looks (for location) is
What is namespace std; and what is consists of? If we want that any wildcard characters in the command line arguments should be appropriately expanded, are we required to make any special provision? If yes, which?