vector::size() vs vector::capacity()

In this article, we will explore and contrast the size() and capacity() functions of the vector class in C++.

Table of contents:

Introduction to vector::size()vector::size() exampleIntroduction to vector::capacity()vector::capacity() examplesDifference between vector::size() and vector::capacity()Example using both functionsTime complexity of vector::size() and vector::capacity()Introduction to vector::size()

The size() member function of the vector class returns the number of elements ...

 •  0 comments  •  flag
Share on Twitter
Published on January 06, 2023 08:33
No comments have been added yet.