Question: Write a class named Sample that contains two class data members nuConstructed and numExists.The class member numConstructed should count the number of class instances constructed
Write a class named Sample that contains two class data members nuConstructed and numExists.The class member numConstructed should count the number of class instances constructed so far regardless of whether those instances still exist or have already been destructed.The class member numExists, on the other hand, should count only the instances that have been constructed and not yet destructed.Both members should be initialized to zero.
Write a class named Sample that contains two class data members numConstructed and numExists. The class member numConstructed should count the number of class instances constructed so far regardless of whether those instances still exist or have already been destructed. The class member numExists, on the other hand, should count only the instances that have been constructed and not yet destructed. Both members should be initialized to zero
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
