
Let us work through a complete example with the following date class as the user-defined type:
class date {
public:
date(int d, int m, int y);
date(const tm& t);
date();
// more constructors and useful member functions
private:
tm tm_date;
};
This class has private data members of type tm, which is the time structure defined in the C library (in header file <ctime>).
©Copyright 1998, Rogue Wave Software, Inc.
Send mail to report errors or comment on the documentation.