CS 70

Key Points

Compilation

  • All of the C++ code we write will go through the following steps:
    • First, the compiler changes source code in to assembly code.
    • Next, the assembler changes the assembly code into object code.
    • Finally, the linker changes the object code into machine code.
  • The compiler deals with all of the parts of variables that are not actually stored in memory at run time.
    • Specifically, that means that errors related to a variable's type or name will be caught at compile time!
  • The (simplest) commands to compile a source file myprogram.cpp into an executable named myprogram and then run that program are
    • clang++ -c myprogram.cpp (compilation and assembly)
    • clang++ myprogram.o -o myprogram (linking)
    • ./myprogram (running the program)
  • (In the homework we will typically have additional command-line options.)

Version Control

  • A version control tool lets us keep track of all the different versions of our files, without having them clutter up our workspace.
  • The version-control tool you will use this semester is called git.
  • We also use a website called GitHub to have a shared, web-accessible place to put copies of everyone's repositories.

Pair Programming

  • Pair programming is a skill. Like any skill, it requires practice and intention to get better.
  • Our job this semester, collectively, is to support each other in developing that skill!

(When logged in, completion status appears here.)