6 Chapter 1
Setting Up Your Development Environment All C++ development environments contain a way to edit source code and a
compiler tool chain to turn that source code into a program. Often, devel-
opment environments also contain a debugger—an invaluable program that
lets you step through a program line by line to find errors.
When all of these tools—the text editor, the compiler tool chain, and
the debugger—are bundled into a single program, that program is called
an interactive development environment (IDE). For beginners and veterans
alike, IDEs can be a huge productivity booster.
N O T E Unfortunately, C++ doesn’t have an interpreter with which to interactively execute C++ code snippets. This is different from other languages like Python, Ruby, and JavaScript, which do have interpreters. Some web applications exist that allow you to test and share small C++ code snippets. See Wandbox (https://wandbox.org/), which allows you to compile and run code, and Matt Godbolt’s Compiler Explorer (https://www.godbolt.org/), which allows you to inspect the assembly code that your code generates. Both work on a variety of compilers and systems. Each operating system has its own source code editors and compiler
tool chain, so this section is broken out by operating system. Skip to the
one that is relevant to you.
Windows 10 and Later: Visual Studio At press time, the most popular C++ compiler for Microsoft Windows is the
Microsoft Visual C++ Compiler (MSVC). The easiest way to obtain MSVC is
to install the Visual Studio 2017 IDE as follows:
1. Download the Community version of Visual Studio 2017. A link is
available at https://ccc.codes/.
2. Run the installer, allowing it to update if required.
3. At the Installing Visual Studio screen, ensure that