The Very Basics
 
 
 

Week 1

Readings:

For this week please read Chapter 1 from page 12, and all of Chapters 2 and 3 in Overland. That may seem like a lot of reading, but a lot of it is on general programming principles that you should already be familiar with from other courses. In other words, feel free to skim most of it. The main goal is that you become familiar with the structure and syntax of C++ programs in comparison. Also, you can ignore the sections in the first few pages regarding how to compile and run C++ programs as you should (hopefully) already know how to do so.

Key Concepts:

The overall goal of this week is to get you acquainted with the basics of C++ that you will need to write any program. To that end, as was mentioned above, the main goal of this week is to be be comfortable with the syntax of basic statements in C++. More specifically, at the end of this week's material, you should feel have a good grasp of:

  • How to print strings and make new lines.
  • What the include and using statements at the beginning of a program are for.
  • Data types and how they are essential to variable declaration in C++ (unlike in Python).
  • How to do basic arithmetic in C++ (which is essentially the same as in other languages).
  • What are valid variable names in C++.
  • If-Else statements, comparison operators, and increment/decrement operators.
  • How to use while loops in C++.
  • Basics from the math library, math.h.
  • Syntax, and use of for loops, including how to declare variables on the fly in a for loop.
  • How to initialize, access, and print out values in arrays.

Exercises from the Reading:

I would suggest doing all the exercises from the reading if possible. No doubt, there are a lot of them, but most of them are simple and build off each other so that the code is very reusable. There is no need to worry if you can't do every exercise, but I think the best way to become comfortable with the syntax of C++ is to write lots of programs in it, so the more you can write the better and the easier the rest of the term will be.

Cryptology Program:

There is no cryptology program for this week.


Files to Be Downloaded