Kommentar
Åtkomst till den här sidan kräver auktorisering. Du kan prova att logga in eller ändra kataloger.
Åtkomst till den här sidan kräver auktorisering. Du kan prova att ändra kataloger.
Specifies a new size for a forward list.
void resize(size_type _Newsize);
void resize(size_type _Newsize, const Type& _Val);
Parameters
Parameter |
Description |
|---|---|
_Newsize |
The number of elements in the resized forward list. |
_Val |
The value to use for padding. |
Remarks
The member functions both ensure that the number of elements in the list henceforth is _Newsize. If it must make the controlled sequence longer, the first member function appends elements with value Type(), while the second member function appends elements with value _Val. To make the controlled sequence shorter, both member functions effectively call erase_after(begin() + _Newsize - 1, end()).
Requirements
Header: <forward_list>
Namespace: std