Hi! I’ll preface this with saying I’m not too far ahead of you in terms of the overall course, but thought I’d lend some thoughts.
The main thing I would suggest is really take your time to absorb the bits and pieces, and think about what you’re working with. Pause the video when a new function is mentioned, google the keyword, and see what it says it does.
Up until Lecture 12, most of everything is just getting set-up. Even 12 is making an empty ‘main’, which is what C++ knows to start with when we compile (read: turn the code into something that can run).
Inside the main, we want to print out a little welcome message to the screen, and the function that does that is cout. It uses a different structure to some of the other functions you earn later, but basically saying
std::cout << “Hang in there!”;
Will use the cout function in the standard library, to print Hang in there! to your screen. Because this counts as output to a stream, it has the include of the <iostream> library.
The other major piece to get your head around is variables. The line that has
constexpr int WORLD_LENGTH = 9;
is assigning a variable. Variables are bits of information like your age or your favourite food. To break down that line above, the constexpr is a way of telling the compiler (again, the thing that turns your beautiful code into a running program) that the variable won’t change.
int says that the variable will be an integer, or whole number. WORLD_LENGTH is the name of the variable, and in case the name of it has you perplexed, it’s just a typo for WORD_LENGTH. There’s nothing special about the name, and it could easily be WordLength or SalarisMagicNumber.
If your program was tracking an age, and you expected it to run long enough to reach a birthday, you might store an age variable as follows:
int Age = 100;
The = and number should be self-explanatory, but more or less, it’s stuffing the value inside a hypothetical envelope labelled WORLD_LENGTH. Whenever we want to use that value, we type that in the code, and the compiler opens up the envelop to see what number is inside.
Your best option would be to ask lots of questions, go back to the earlier lectures, and share what you’ve done if yours isn’t working. We’re all learning in one way or another.