Definition
Pointer<T> p
Pointer<T> p(1)
Specification: Defines a pointer p.
- In the first form, p may refer to any object of type
T. p does not yet refer to any object.
- In the second form, p is bound to a new memory block that may hold
any T object. The memory block does not yet hold any T
object.
Constraint: It is syntactically possible but illegal to define
for n !=
Pointer<T> p(n)
Note: The second form is equivalent to
Pointer<T> p
p.alloc
()
which is in turn equivalent to but more efficient than
Pointer<T> p
p =
Pointer<T>::Alloc
()
Author: Wolfgang Schreiner
Last Modification: April 12, 1997