In this module we introduce Object-Oriented Programming!
Typically when we speak about 'arrays' we are referring to a contiguous block of memory that is established at compile-time. That is, in our source code, somewhere we are saying -- I want '6 integers' to be grouped next to each other, and then I can conveniently access each of those integers using an offset.
// An example creating an array of 6 integers.
int myData[6];
TODO Add illustration showing 0-based index and each uninitialized piece of memory.
// An example initializing an array and each of the 6 integers.
int myData[6] = {2,4,6,8,10,12};
In the example above, we initialize our memory.
// Compiler inferring the size of 6 elements here.
int myData[] = {2,4,6,8,10,12};
We can also 'infer' the size of our array as shown above, and omit the 6 elements.
In Modern C++, starting with C++11, we can use std::array<int,6> myData;
to equivalently create an array of 6 integers.
TODO
TODO Talk about copying an array to a new size, and then 'pointing' to a new elemnet.
TODO:
TODO