Syntax:
#include <string> void reserve( size_type size = 0 );
The reserve() function sets the capacity of the string to at least size. A call of reserve() without an argument is a nonbinding shrink-to-fit request. reserve() runs in linear time.
Related Topics: capacity