1 Week 1: Learning C++
This week we’ll be focusing on learning C++. C++ is a big language, and so some of it you’ll need to learn yourself, since we necessarily just won’t be able to cover everything in class.
Instead of writing large sets of notes on C++, I’m going to offer up some useful pointers to resources I recommend you use to learn C++, and then provide specific targeted tutorials, screencasts, and notes on specific features apropos to our course. You, of course, don’t have to understand everything in the first week. You just have to be able to read and understand enough to do the first lab.
1.1 The C++ Tour
Link to the C++ tour freely available
Your main resource for learning C++ should be the C++ tour. It’s 180 PDF pages, and is freely available online. This is what I recommend as your first stop for getting your head around the terms of C++. You probably won’t really have context until we go through our course and discuss some more of the challenging features. Note that the tour has four parts, but each individual chapter is one off, e.g., Part 1 occurs as chapter 2 in the linked PDFs. This is because the tour is an excerpt from the book "The C++ Programming Language." I will be referring to the sections in the PDFs (so 2.2.5 means the PDF from Part 1 on the website).
Required reading: Part 1: Sections 2.0 to 2.2.5
Optional, but highly encouraged: The rest of part 1 (all sections of 2), and Part 2
Parts 3 and 4 of the book contain information about using the C++ standard library. For example, if you wanted to learn how to use a LinkedList or HashTable, you’d look here.
(Slides in Keynote) and (Slides in PDF)
1.2 Friday’s Lecture
1.3 Goals for this week
Be well on your way completing lab 1.
Understand the basic structure of a C++ program, and be able to articulate what differentiates it from higher-level languages like Python.
Understand basic concepts in C++: variables, functions, declarations, loops, etc...
Code some algorithms in C++ in a recursive and iteractive style
Understand C++’s generic for syntax to loop over elements of a container
Articulate what a higher order function is in C++ and how you would write a basic one