Track Number of Objects
Understand how to track the number of objects created from a Sample class.
We'll cover the following...
Challenge
Write a program to track the number of objects that are created from a class Sample
. Define a getCount()
member function in it, with which we can get at any time the current count of objects that have been created from the Sample class.
Coding exercise
You have to declare a ...