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

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 */

Working with files in cpp, Operation Files 2.1. Your program should open an...

Operation Files 2.1. Your program should open and read the file specified by the first command line argument of the program. 2.2. The first line of the file contains an integer

Destruction of local object, Need assignment help What's the order that ...

Need assignment help What's the order that local objects are destructed?

C program to replace every occurrence of in a string, Program is to replace...

Program is to replace every occurrence of in a string: Program is to replace every occurrence of c1 in string with c2 and have function return the no. of replacement int re

C++ code, write c++ programm calculate electricity bill with person name,us...

write c++ programm calculate electricity bill with person name,use ,id

ALGORITHM, write a pseudocode algorithm for a program that accepts a number...

write a pseudocode algorithm for a program that accepts a number and prints out its reciprocal(1/n) is required.the program should prevent the user from entering zero by asking t

Age guessing game, Write a program that predicts users’ age (0-128 years ol...

Write a program that predicts users’ age (0-128 years old) with at most 7 questions. The game starts with asking the user whether he/she is younger or older than G (an initial gues

Write a program to compute the equation, Write a program to compute the fol...

Write a program to compute the following equation for values of time.           y = 2x+3   The values of time are stored in the file program.dat and the solution should be display

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