Question: Create a constructor and a destructor for the class. The constructor should initialize both member variables of the class to their own default 0 value.

Create a constructor and a destructor for the class. The constructor should initialize both member variables of the class to their own default 0 value. The destructor should just display a message "Person has been terminated". Both functions should be DEFINED in the class.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!