A simple dynamic array of integers. 更多...
#include <DetourAlloc.h>
Public 成员函数 | |
| dtIntArray () | |
| Constructs an instance with an initial array size of zero. | |
| dtIntArray (int n) | |
| Constructs an instance initialized to the specified size. 更多... | |
| int & | operator[] (int i) |
| The value at the specified array index. 更多... | |
| const int & | operator[] (int i) const |
| The value at the specified array index. 更多... | |
| int | pop () |
| Returns the value at the end of the array and reduces the size by one. 更多... | |
| void | push (int item) |
| Push the specified integer onto the end of the array and increases the size by one. 更多... | |
| void | resize (int n) |
| Specifies the new size of the integer array. 更多... | |
| int | size () const |
| The current size of the integer array. | |
A simple dynamic array of integers.
|
inline |
Constructs an instance initialized to the specified size.
| [in] | n | The initial size of the integer array. |
|
inline |
The value at the specified array index.
| [in] | i | The index of the value. |
|
inline |
The value at the specified array index.
| [in] | i | The index of the value. |
|
inline |
Returns the value at the end of the array and reduces the size by one.
|
inline |
Push the specified integer onto the end of the array and increases the size by one.
| [in] | item | The new value. |
| void dtIntArray::resize | ( | int | n | ) |
Specifies the new size of the integer array.
| [in] | n | The new size of the integer array. |