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

Program to display the greatest common divisor , Many modern cryptography a...

Many modern cryptography algorithms require two numbers that are coprime, or sometimes referred to as relatively prime. Two numbers are coprime if their greatest common divisor is

What are the debugging methods you employ while came across , What are the ...

What are the debugging methods you employ while came across a problem? A: Debugging with tools such as: 1.      DBG, GDB ,Forte, Visual Studio. 2.      Using tusc to trace

But mfc appear to encourage the employ of catch-by-pointer;, Q: But MFC app...

Q: But MFC appear to encourage the employ of catch-by-pointer; should I do the similar? A: Depends. If you're utilizing MFC and catching one of their exceptions, by all means, d

What is some reward/drawback of using friend functions?, A: They present a ...

A: They present a degree of freedom in the interface design options. Member functions & friend functions are equally privileged (100% vested). The major difference is that a fri

Change to palindrome, a palindrome is a string that reads the same from bho...

a palindrome is a string that reads the same from bhote the ends

What is memory allocation, What is memory allocation? Memory Allocation...

What is memory allocation? Memory Allocation : It is the method of allocating memory storage to program in such that the program can be run.

Define nested class? why can it be useful?, it is a class enclosed in the s...

it is a class enclosed in the scope of another class. For illustration: // Example: Nested class // class OuterClass { class NestedClass { // ... }; // .

Psudo code for interrupt handler , The rPeANUt simulator provides buffering...

The rPeANUt simulator provides buffering of the characters that are typed into the terminal. However, this would generally not be the case so if the program did not consume a chara

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