Javatpoint Logo
Javatpoint Logo

C++ Vector shrink_to_fit()

This function is used to change the capacity of the vector and makes it equal to the size of the vector.


Consider a vector 'v'. Syntax would be:


It does not contain any parameter.

Return value

It does not return any value.

Next TopicC++ Vector

Youtube For Videos Join Our Youtube Channel: Join Now

Help Others, Please Share

facebook twitter pinterest

Learn Latest Tutorials


Trending Technologies

B.Tech / MCA