本文发表在 rolia.net 枫下论坛Member Functions
assign
Erases a vector and copies the specified elements to the empty vector.
at
Returns a reference to the element at a specified location in the vector.
back
Returns a reference to the last element of the vector.
begin
Returns a random-access iterator to the first element in the container.
capacity
Returns the number of elements that the vector could contain without allocating more storage.
clear
Erases the elements of the vector.
empty
Tests if the vector container is empty.
end
Returns a random-access iterator that points just beyond the end of the vector.
erase
Removes an element or a range of elements in a vector from specified positions.
front
Returns a reference to the first element in a vector.
get_allocator
Returns an object to the allocator class used by a vector.
insert
Inserts an element or a number of elements into the vector at a specified position.
max_size
Returns the maximum length of the vector.
pop_back
Deletes the element at the end of the vector.
push_back
Add an element to the end of the vector.
rbegin
Returns an iterator to the first element in a reversed vector.
rend
Returns an iterator to the end of a reversed vector.
resize
Specifies a new size for a vector.
reserve
Reserves a minimum length of storage for a vector object.
size
Returns the number of elements in the vector.
swap
Exchanges the elements of two vectors.
Operators
operator[]
Returns a reference to the vector element at a specified position.更多精彩文章及讨论,请光临枫下论坛 rolia.net
assign
Erases a vector and copies the specified elements to the empty vector.
at
Returns a reference to the element at a specified location in the vector.
back
Returns a reference to the last element of the vector.
begin
Returns a random-access iterator to the first element in the container.
capacity
Returns the number of elements that the vector could contain without allocating more storage.
clear
Erases the elements of the vector.
empty
Tests if the vector container is empty.
end
Returns a random-access iterator that points just beyond the end of the vector.
erase
Removes an element or a range of elements in a vector from specified positions.
front
Returns a reference to the first element in a vector.
get_allocator
Returns an object to the allocator class used by a vector.
insert
Inserts an element or a number of elements into the vector at a specified position.
max_size
Returns the maximum length of the vector.
pop_back
Deletes the element at the end of the vector.
push_back
Add an element to the end of the vector.
rbegin
Returns an iterator to the first element in a reversed vector.
rend
Returns an iterator to the end of a reversed vector.
resize
Specifies a new size for a vector.
reserve
Reserves a minimum length of storage for a vector object.
size
Returns the number of elements in the vector.
swap
Exchanges the elements of two vectors.
Operators
operator[]
Returns a reference to the vector element at a specified position.更多精彩文章及讨论,请光临枫下论坛 rolia.net