Explain the difference between a vector’s capacity and its size
belongs to book: C++ Primer|Stanley B.Lippman, Josee Lajoie, Barbara E.Moo|5th Edition| Chapter number:9| Question number:35
All Answers
total answers (1)
belongs to book: C++ Primer|Stanley B.Lippman, Josee Lajoie, Barbara E.Moo|5th Edition| Chapter number:9| Question number:35
total answers (1)
The
`capacity`
of a vector is how many elements the vector **can hold**.The
`size`
of a vector is how many elements the vector **already holds**.