Explain the default constructor and destructor, C/C++ Programming

Assignment Help:

The default Constructor and Destructor

If you fail to write a constructor and destructor function,  the compiler automatically supplies them for you. These functions have public access and essentially do nothing useful. If you were to write these functions yourselves, this would look like:

                class employee

                 {

                public :

                                employee()

                                                 {

                                                 }

 

                                ~employee();

                                 {

                                 }

    };

 


Related Discussions:- Explain the default constructor and destructor

Explain external variables, External Variables Different functions of t...

External Variables Different functions of the similar program can be written in different source files and can be compiled together. The scope of a global variable is not limit

Using nested if statement, write a program in c/C++ using nested if stateme...

write a program in c/C++ using nested if statement for calculating the average marks and grades of 5 subjects

Array, how to pass array

how to pass array

Sequence for DMA controller, Write a sequence of instructions that transfer...

Write a sequence of instructions that transfers data from memory to an external I/O device by using channel 3 of the 8237 DMA controller. Transfer from 20000H-20FFFH.

Quicksorting in linked lists, How do i write a code in C++ to bubblesort in...

How do i write a code in C++ to bubblesort in linked list

Described the order that objects in an array is destructed?, Described the ...

Described the order that objects in an array is destructed?

What is a conversion constructor c++, A constructor that accepts one argume...

A constructor that accepts one argument of a dissimilar type.

Areaundercurve, 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) between the limits of a and b. The area under a curve betw .

Error handling and constructor, Provide me the answer, Can a constructor th...

Provide me the answer, Can a constructor throws an exception? How to handle the error when the constructor fails?

Explain comments in c++, Comments Comments are integral part of every p...

Comments Comments are integral part of every program . Comments help in coding, debugging and maintaining a program . The compiler ignores them. They should be used liberally i

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