Programming environments
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)
- in the zyBook—required to submit Challenge Activities and zyLabs
Getting setup
Aside from the zyBook, all the software required for this course and associated online accounts are free.
- Install a C++ compiler and develop C++ programs
- video: Install a C++ compiler (macOS or Windows)
- written instructions: Installing a C++ compiler
- Install the Visual Studio Code plain text editor (here's a video going over VS Code—click "Show more" in the description for a table of contents)
- install the "C++ Intellisense VS Code" plugin by clicking on the plugins icon on the left of any VS Code window (1. in the screenshot below), find "C++ Intellisense" in the list of recommended plugins" (2. in the screenshot), and click "Install" (3. in the screenshot)
- HINT: after writing a program, you can auto-format your code (i.e.,fix indentation and spacing) by using Shift+Alt+F (Windows) or Shift+Option+F (macOS)—here's a video example
- install the "Live Share Extension Pack" code plugin (similar steps to above, but search for "Live Share Extension Pack")
- this will allow you to share a VS Code window with others and collaboratively edit/run code in real time; you can also chat over audio
- see this video Links to an external site. (note that "VS Live Share" has been renamed "Live Share")
- you need a (free) Microsoft Links to an external site. or GitHub Links to an external site. account
- install the "C++ Intellisense VS Code" plugin by clicking on the plugins icon on the left of any VS Code window (1. in the screenshot below), find "C++ Intellisense" in the list of recommended plugins" (2. in the screenshot), and click "Install" (3. in the screenshot)
- Develop C++ programs
- video: Compile and run a simple C++ program
- written instructions: Compiling and running a C++ program
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".
- Command line basics
- video: What is the command line?
- written guide: The command line interface