Derived type
From Wikipedia, the free encyclopedia
For types constructed from primitive and other types, see composite type.
| This article's factual accuracy is disputed. Please see the relevant discussion on the talk page. (March 2008) |
A derived type is a type given a new type but structurally the same as the original type. The purpose of this type is to create a new type name so that two values can have two distinct types in terms of name. This type matters if the type system uses a name equivalence rule (nominative type system) but does not matter if the system uses a structural equivalence (structural type system).
In C and C++, typedef can be used to create a derived type, like so:
typedef int timestamp;
(Here, timestamp is a type derived from int.)
See also: subtype.

