What is the use of default constructor, C/C++ Programming

Assignment Help:

What is the use of default constructor?

- It's a constructor that doesn't accept any parameters.

- If there is no user-defined constructor for a class, compiler declares a default parameter less constructor known as default constructor. It's an inline public member of its class.

When compiler uses this constructor to create an object -constructor will have no constructor initializer and a null body.

 


Related Discussions:- What is the use of default constructor

Arrays, how to declare multi dimensional array

how to declare multi dimensional array

C, A Padovan string P(n) for a natural number n is defined as: P(0) = ‘X’ P...

A Padovan string P(n) for a natural number n is defined as: P(0) = ‘X’ P(1) = ‘Y’ P(2) = ‘Z’ P(n) = P(n-2) + P(n-3), n>2 where + denotes string concatenation. For a string of the c

Friends of classes, Define the following Window class : - integer  data mem...

Define the following Window class : - integer  data members, width and height - a constructor  that accepts two integer  parameters  (width followed by height) and uses them to ini

Encryption/Decryption, I need to include files so you can understand easier...

I need to include files so you can understand easier.

Explain about the integer constants in c language, Explain about the Intege...

Explain about the Integer constants in c language? An integer constant is the integer valued number and it refers to a sequence of digits. A decimal integer constant includes o

Class and object, how to write c++ code for financial system using class an...

how to write c++ code for financial system using class and object

The use of the break and continue statements in a loop, Question: (a) ...

Question: (a) A bank has four types of accounts with annual interest rates as follows: Savings 8% Savings with Cheque Book 5% Current 4% Fixed deposits 10% Using

Area under curve, write a program to find the area under the curve y=f(x) b...

write a program to find the area under the curve y=f(x) between x=a and x=b integrate y=f(x)   #include float start_point, /* GLOBAL VARIABLES */

Write Your Message!

Captcha
Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd