Multiple distinct objects: Difference between revisions

m
Link to sequence.
(→‎{{header|Delphi}}: fixed snippet, good/bad were reversed)
m (Link to sequence.)
Line 1:
{{task|Object oriented}}
Create a [[sequence]] (array, list, whatever) consisting of <var>n</var> distinct, initialized items of the same type. <var>n</var> should be determined at runtime.
 
By ''distinct'' we mean that if they are mutable, changes to one do not affect all others; if there is an appropriate equality operator they are considered unequal; etc. The code need not specify a particular kind of distinction, but do not use e.g. a numeric-range generator which does not generalize.
Anonymous user