diff --git a/README.md b/README.md index c6192cb..8a14db1 100644 --- a/README.md +++ b/README.md @@ -2,130 +2,4 @@ This repository contains starter code for Stanford CS106L, a course on Standard C++ programming. -## Getting Started - -Before getting started, a few prerequisites: - -* You will need [Python 3.8](https://www.python.org/downloads/) or higher on your computer. You can check by running `python3 --version` (`python --version` on Windows) in a terminal. -* You will need an IDE you can code in. We encourage you to use VSCode for this class ([see guide below](#vscode-setup-instructions)), but you may use any IDE that you can comfortably write and compile C++ code in. -* You will need [Git](https://git-scm.com/). If you are using VSCode, you should already have this. You can check by running `git --version` in a terminal. - -Next, download the starter code. Open up a terminal (if you are using VSCode, hit Ctrl+\` or go to **Terminal > New Terminal** at the top) and run the following command: - -```sh -git clone https://github.com/cs106l/cs106l-assignments.git -``` - -which will download the starter code into a folder `cs106l-assignments`. If you are using VSCode, you can then open up a VSCode workspace dedicated to CS106L: - -```sh -cd cs106l-assignments && code . -``` - -and you are ready to go! - -### Fetching assignments - -As we update existing assignments and release new ones, we will push updates to this repository. To fetch a new assignment, open up a terminal to your `cs106l-assignments` directory and run - -```sh -git pull origin main -``` - -You should now have the latest starter code! - -## VSCode Setup Instructions - -We recommend using VSCode to write C++ code for this class. See instructions below to setup VSCode/GCC for your machine. - -### Mac - -#### Step One: Installing VSCode - -Go to [this link](https://code.visualstudio.com/docs/setup/mac) -and download Visual Studio Code for Mac. Follow the instructions on this webpage under the -section **Installation**. - -Inside VSCode, head to the extensions tab and search for **C/C++**. Click on the **C/C++** extension, and then click **Install**. - - 🥳 At this point you should successfully have VSCode on your Mac 👏 - -#### Step Two: Installing a C++ Compiler - -
    -
  1. - Check if you have Homebrew by running -
    brew --version
    - If you get something like -
    -brew --version
    -Homebrew 4.2.21
    - then skip step 2 and go to step 3. If you get anything else that looks sus then proceed to step 2! -
  2. -
  3. - Run this command: -
    /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
    - which is going to download Homebrew🍺 which is a package manager. Woot woot. -
  4. -
  5. - Run the following command: -
    brew install gcc
    - which is going to install the compiler (GCC). -
  6. -
  7. - Make note of which GCC version Homebrew installs. In most cases, this will be g++-14. - By default, the g++ command on Mac is an alias to the built-in clang compiler. We can fix this by running
    echo 'alias g++="g++-14"' >> ~/.zshrc
    to make g++ point to the version of GCC we just installed. Change g++-14 in the above command to whichever version of GCC you installed. -
  8. - Restart your terminal and verify that everything worked by running the following command: -
    g++ --version
    -
  9. -
- -### Linux - -These instructions are for Debian-based distributions, like Ubuntu. Tested on Ubuntu 20.04 LTS. - -#### Step One: Installing VSCode - -Go to [this link](https://code.visualstudio.com/docs/setup/linux) -and download Visual Studio Code for Linux. Follow the instructions on this webpage under the section **Installation**. - -Inside VSCode, head to the extensions tab and search for **C/C++**. Click on the **C/C++** extension, and then click **Install**. - - 🥳 At this point you should successfully have VSCode on your Linux machine 👏 - -#### Step Two: Installing a C++ Compiler - -
    -
  1. In a terminal, update the Ubuntu package lists by running
    sudo apt-get update
  2. -
  3. Next install the G++ compiler:
    sudo apt-get install g++-10
  4. -
  5. By default, the system version of G++ will be used. To change it to the version you just installed, you can configure Linux to use G++ version 10 or a higher version installed like so:
    sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-10 10
  6. -
  7. Restart your terminal and verify that GCC was installed correctly. You must have a GCC version of 10 or higher:
    g++ --version
  8. -
- - -### Windows - -#### Step One: Installing VSCode - -Go to [this link](https://code.visualstudio.com/docs/setup/windows) -and download Visual Studio Code for Windows. Follow the instructions on this webpage under the -section **Installation**. - -Inside VSCode, head to the extensions tab and search for **C/C++**. Click on the **C/C++** extension, and then click **Install**. - - 🥳 At this point you should successfully have VSCode on your PC 👏 - -#### Step Two: Installing a C++ Compiler - -1. Follow the instructions at [this link](https://code.visualstudio.com/docs/cpp/config-mingw) - * You should be doing the instructions under **Installing the -MinGW-w64 toolchain.** - -2. After fully following the instructions under **Installing the -MinGW-w64 toolchain** you should now be able to verify -everything worked by running the following command: - -```sh -g++ --version -``` +To get started, [follow the setup instructions in A0](/assign0/README.md)! \ No newline at end of file