Static members
Posted: 2012年10月09日(火) 18:02
正しく動作させるためには、あとどうすれば良いでしょうか?
Write a class UniqueID such that each instance of this class has a unique identifier (the type of this identifier should be int). The identifier for the first instance of UniqueID should be one, then each new instance will have an identifier with the value one plus the identifier of the previously created object. The identifier can be accessed with the method getID().
Define the class UniqueID in files named UniqueID.h and UniqueID.cpp. To test your code create a file testUniqueID.cpp and type the code below:
Write a class UniqueID such that each instance of this class has a unique identifier (the type of this identifier should be int). The identifier for the first instance of UniqueID should be one, then each new instance will have an identifier with the value one plus the identifier of the previously created object. The identifier can be accessed with the method getID().
Define the class UniqueID in files named UniqueID.h and UniqueID.cpp. To test your code create a file testUniqueID.cpp and type the code below: