Arrays and Vectors
The course is part of this learning path
This course explores arrays and vectors which are types of data structures in C++. We'll focus on built-in arrays, which C++ inherits from the C programming language, and a couple of sequence containers including the array template class and the vector template class, which are part of the standard template library or STL.
- Beginner coders, new to C++
- Developers looking to upskill by adding C++ to their CV
- College students and anyone studying C++
To get the most out of this course, you should have a basic understanding of the fundamentals of C++.
We've learned a ton in this section. So, if you need to take a short nap or stretch your legs, I encourage you to do so right after watching this section wrap-up. You deserve it. So, what did we learn in this section? We built on top of our knowledge of fundamental C++, including data types variables; input and output, control, flow, and tons of other topics, and we added our first true data structures to our toolkit. Data structures are again, containers that can hold many elements if we want them to. There are many different data structures, but in this section, we focused on built-in arrays, which C++ inherits from the C programming language, and a couple sequence containers including the array template class and the vector template class, which are part of the standard template library or STL.
Now, we can hold multiple pieces of data in a container that we give a single name to. We can use arrays, either built-in or the array class to hold a fixed number of elements or vectors if we need 'array-like' behavior, but for the container to be able to resize to accommodate more elements. In the next section, we're going to formalize our understanding of functions, both those that are provided to us and our own custom user-defined functions. These will allow us to better organize and modularize our code, and write code that's more maintainable. So, after you take that short break or short nap, I'll see you in the next section.
John has a Ph.D. in Computer Science and is a professional software engineer and consultant, as well as a computer science university professor and department chair.