This member function effectively calls the member function push_back of the underlying container object.
Parameters
- x
- Value to be copied to the new element.
T is the first template parameter (the type of the elements stored in the queue).
Return value
noneExample
| 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 |
|
The example uses push to add a new elements to the queue, which are then popped out in the same order.
Complexity
Constant.See also
| queue::pop | Delete next element (public member function) |
| queue::size | Return size (public member function) |
