C++ Tutorial for Beginners 20: Arrays - Your C++ Shopping Lists

Arrays are a vital construct in nearly all programming languages. They allow you to deal with lists of semantically identical items, rather like a shopping list. A shopping list contains a bunch of items which all have in common the fact that they can be bought from a shop. In a similar sort of way, in programming you often need to deal with lists of items that aren't sufficiently distinct to warrant creating a new variable for each one; instead, you can create an array of similar items.

Arrays are also great for dealing with vast lists of items, avoiding cluttering up your code with thousands of variables that all refer to similar items.

Well, the importance of arrays goes even far beyond this. Let's get started ...

Don't forget to switch to HD when the video is running!



Click here to download source code for this tutorial.