C++ Vector introduction, an array with flexible number of elements ,No need to specify size first

Опубликовано: 07 Октябрь 2024
на канале: RioProfessor Liu
57
2

8.11 Vectors

Holds a set of elements, like an array
Flexible number of elements - can grow and shrink
–No need to specify size when defined

–Automatically adds more space as needed

Defined in the Standard Template Library (STL)
–Covered in a later chapter

Must include vector header file to use vectors