Create a class that includes a data member that holds a “serial number” for each object created
from the class. That is, the first object created will be numbered 1, the second 2, and so on. Add a
member function that permits an object to report its own serial number. Then write a main ()
program that creates three objects and queries each one about its serial number. They should
respond I am object number 2, and so on.
Comments
Leave a comment