CS 142 Introduction to Computer Science II
Spring 2025
Compiler/IDE

Visual Studio. (For Windows.) Visual Studio is the integrated development environment (IDE) that I will use this semester for the in-class demonstrations. You can download it here. The Community version is free and is all you need for this course.

During the installation process, you will need to choose a "Workload". Choose Desktop development with C++.

Note that Visual Studio Code is just an editor, not a full IDE. Make sure you get Visual Studio Community.

Code::Blocks. (For Windows and Linux.) Code::Blocks is a free, open-source IDE that I've often used for the in-class demonstrations when teaching this course. You can download it here.

If you download the version for Windows, make sure you download the one with MinGW (file codeblocks-20.03mingw-setup.exe), unless you already have a compatible C++ compiler installed on your computer.

If you already have an older version of Code::Blocks, please download the latest version. The version of the gcc compiler that comes with the latest version fixes errors in some of the older versions.

After installing Code::Blocks, I recommend that you set the following compiler options. Under the "Settings" menu, choose "Compiler". In the window that appears, from the drop-down menu at the top, select "GNU GCC Compiler" and set it as the default compiler by clicking the corresponding button. Then select the "Compiler settings" tab and the "Compiler flags" subtab. Check the following four boxes:

  1. "Have g++ follow the C++11 ISO C++ language standard [-std=c++11]"
  2. "Enable all common compiler warnings (...) [-Wall]"
  3. "Enable extra compiler warnings [-Wextra]"
  4. "Enable warnings demanded by strict ISO C and ISO C++ [-pedantic]"

This will cause the compiler to conform to the C++11 standard and produce lots of useful warning messages.

Xcode. (For macOS.) Xcode is Apple's IDE. It's available for free in the App Store. You can find help on the Apple website but you can also watch the following YouTube video to get you started.