Software: VS Code, C++ compiler, & command line reference

Two programming environments

We will program in a two environments this semester:

  • locally on your computer (using Visual Studio Code to edit code and the g++ compiler—doesn't require an internet connection, what you would use in the real world, and gives you experience with the command line (also allows real-time collaboration)
    • you'll need to know how to get around the command line to compile and run code (see below)
  • in the zyBook—required to submit Challenge Activities and zyLabs

Aside from the zyBook, all the software required for this course and associated online accounts are free. Instructions for how to install and use the requisite software is below.

C++ compiler (g++)

Visual Studio Code editor

Formatting your code

You should become familiar with proper code formatting conventions concerning indentation and spacing; see this page Links to an external site.. If you find you are having trouble, you may use the autoformatter, which you can run by pressing Shift+Alt+F (Windows) or Shift+Option+F (macOS)—here's a video example.

Using the command line

Since we will compile and run C++ program from a command line, it's important that you know a few basic command line commands to help you navigate through it. It will seem pretty foreign at first, but as you practice with it, it'll become second nature in just a few weeks. Visual Studio Code has a built in command line that you can access by going to "View" -> "Terminal".

Putting it all together: write, compile, and run a simple program