Skip to Content
Learn
Vectors
Introduction to Vectors

To do just about anything of interest in a program, we need a group of data to work with.

For example, our program might need:

  • A list of Twitter’s trending tags
  • A set of payment options for a car
  • A catalog of eBooks read over the last year

The need for storing a collection of data is endless.

We are familiar with data types like int and double, but how do we store a group of ints or a group of doubles?

In this lesson, we will start with one of the simplest, and arguably the most useful, ways of storing data in C++: a vector.

A vector is a sequence of elements that you can access by index.

Instructions

Click Next to continue.

Folder Icon

Take this course for free

Already have an account?