Parameters
noneReturn value
A pointer to the element pointed by the auto_ptr object.X is auto_ptr's template parameter (i.e., the type pointed).
Example
| 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 |
|
Output:
0 5 10 15 20 |
See also
| auto_ptr::operator* | Dereference object (public member function) |
| auto_ptr::get | Get pointer (public member function) |
| auto_ptr::reset | Deallocate object pointed and set new value (public member function) |
