C++ Environment Setup

You must install a C++ compiler and a Text editor to write and debug C++ code to get started. 

Text Editor

C++ programming should begin with a text editor, whose name and version can change on several operating systems.

  • For instance, vim or notepad can be used on Windows, Linux, or UNIX, while you can use notepad on Windows.
  • The files you produce with your editor are referred to as source files. In C++, they are commonly designated with the extension “.cpp”,”.cp”, or”.c”.

C++ Compiler

C++ compiler will convert source code into an executable program. The GNU C/C++ compiler is the most popular and freely available.

If you are using Operating Systems like UNIX/Linux, Mac OS, or Windows, you can download and install the C++ compilers below the given links.

  • UNIX/Linux: Installing UNIX/Linux requires following the detailed instructions at https://gcc.gnu.org/install.
  • Mac OS X: Downloading the Xcode development environment from Apple’s website and following the installation instructions is the easiest way to get GCC if you use Mac OS X.Developer.Apple.com/technologies/tools/ currently hosts Xcode.
  • Windows: You must install MinGW before installing GCC on Windows. Visit the MinGW website at www.mingw.org to install MinGW.

IDEs to considering 

An IDE, an acronym for Integrated Development Environment, is a better choice when setting up your environment for C++ development. An IDE provides both the compiler and the text editor in one package and usually does not require manual configuration.

C++ IDE for Windows and Mac OS

Below are some of the most used IDE for C++ Programming:

C++Builder: https://www.embarcadero.com/products/

Visual Studio Community Edition: https://code.visualstudio.com/

Eclipse: https://www.eclipse.org/ide/

Codelite: https://codelite.org/

Atom: https://atom.io/

In this course, we will be using the visual studio community edition.

Online Compilers

You can also use online compilers in this course to run your code, which is perfect for learning. However, I recommend setting up a local environment to get used to creating and configuring C++ projects.

This concludes the C++ Environment Setup lesson. In the next lesson, you will learn about the Syntax of the C++ program.