Installing an IDE on Windows
In this recipe, we will find out how easy it is to install Visual Studio on your Windows machine.
Getting ready
To go through this recipe, you will need a machine running Windows. No other prerequisites are required.
How to do it…
Visual Studio is a powerful IDE in which most professional software is written. It has loads of features and plugins to help us write better code:
- Go to https://www.visualstudio.com.
- Click on Download Visual Studio Community.
- This should download an
.exe
file. - After it downloads, double-click on the setup file to start the installation.
- Make sure you have all the updates necessary on your Windows machine.
- You can also download any version of Visual Studio or Visual C++ Express.
- If the application asks for starting environment settings, select C++ from the available options.
Note
A few things to note are listed here:
- You need a Microsoft account to install it.
- There are other free IDEs for C++, such as NetBeans, Eclipse, and Code::Blocks.
- While Visual Studio works only for Windows, Code::Blocks and other such IDEs are cross-platform and can work on Mac and Linux as well.
For the remainder of this chapter, all code examples and snippets will be provided using Visual Studio.
How it works…
An IDE is a programming environment. An IDE consists of various functionalities that can vary from one IDE to another. However, the most basic functionalities that are present in all IDEs are a code editor, a compiler, a debugger, a linker, and a GUI builder.
A code editor, or a source code editor as they are otherwise known, is useful for editing code written by programmers. They provide features such as auto-correct, syntax highlighting, bracket completion and indentation, and so on. An example snapshot of the Visual Studio code editor is shown here:
A compiler is a computer program that converts your C++ code to object code. This is necessary in order to create an executable. If you have a file called main.cpp
, it will generate an object code called main.o
.
A linker is a computer program that converts the object code generated by the compiler to an executable or a library file:
A debugger is a computer program that helps to test and debug computer programs.
A GUI builder helps the designer and programmer to create GUI content or widgets easily. It uses a drag and drop WYSIWYG tool editor.